Package org.apache.pdfbox.pdfparser
Class PDFXrefStreamParser
java.lang.Object
org.apache.pdfbox.pdfparser.BaseParser
org.apache.pdfbox.pdfparser.PDFXrefStreamParser
This will parse a PDF 1.5 (or better) Xref stream and
extract the xref information from the stream.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]Fields inherited from class org.apache.pdfbox.pdfparser.BaseParser
A, ASCII_CR, ASCII_LF, B, D, DEF, document, E, ENDOBJ_STRING, ENDSTREAM_STRING, J, M, MAX_LENGTH_LONG, N, O, R, S, source, STREAM_STRING, T -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidclose()private voidinitParserValues(COSStream stream) voidparse(XrefTrailerResolver resolver) Parses through the unfiltered stream and populates the xrefTable HashMap.private longparseValue(byte[] data, int start, int length) private voidreadNextValue(byte[] value) Methods inherited from class org.apache.pdfbox.pdfparser.BaseParser
getObjectKey, isClosing, isClosing, isDigit, isDigit, isEndOfName, isEOF, isEOL, isEOL, isSpace, isSpace, isWhitespace, isWhitespace, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSString, parseDirObject, readExpectedChar, readExpectedString, readGenerationNumber, readInt, readLine, readLong, readObjectNumber, readString, readString, readStringNumber, skipLinebreak, skipSpaces, skipWhiteSpaces
-
Field Details
-
w
private final int[] w -
objectNumbers
-
-
Constructor Details
-
PDFXrefStreamParser
Constructor.- Parameters:
stream- The stream to parse.document- The document for the current parsing.- Throws:
IOException- If there is an error initializing the stream.
-
-
Method Details
-
initParserValues
- Throws:
IOException
-
close
- Throws:
IOException
-
parse
Parses through the unfiltered stream and populates the xrefTable HashMap.- Parameters:
resolver- resolver to read the xref/trailer information- Throws:
IOException- If there is an error while parsing the stream.
-
readNextValue
- Throws:
IOException
-
parseValue
private long parseValue(byte[] data, int start, int length)
-