java.lang.Object
org.sejda.sambox.input.SourceReader
org.sejda.sambox.input.BaseCOSParser
org.sejda.sambox.input.COSParser
- All Implemented Interfaces:
Closeable,AutoCloseable
Parser for COS objects capable of handling indirect references.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate final IndirectObjectsProviderFields inherited from class org.sejda.sambox.input.BaseCOSParser
ENDOBJ, ENDSTREAM, STREAMFields inherited from class org.sejda.sambox.input.SourceReader
OBJ -
Constructor Summary
ConstructorsConstructorDescriptionCOSParser(org.sejda.io.SeekableSource source) COSParser(org.sejda.io.SeekableSource source, IndirectObjectsProvider provider) -
Method Summary
Methods inherited from class org.sejda.sambox.input.BaseCOSParser
nextArray, nextBoolean, nextDictionary, nextHexadecimalString, nextLiteralString, nextName, nextNull, nextNumber, nextStream, nextStringMethods inherited from class org.sejda.sambox.input.SourceReader
isNextToken, length, offset, position, position, readGenerationNumber, readHexString, readInt, readIntegerNumber, readLine, readLiteralString, readLong, readName, readNumber, readObjectNumber, readToken, skipExpected, skipExpected, skipExpectedIndirectObjectDefinition, skipIndirectObjectDefinition, skipSpaces, skipTokenIfValue, source, unreadIfValid, unreadSpaces, unreadUntilSpaces
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
provider
-
-
Constructor Details
-
COSParser
COSParser(org.sejda.io.SeekableSource source) -
COSParser
COSParser(org.sejda.io.SeekableSource source, IndirectObjectsProvider provider)
-
-
Method Details
-
nextParsedToken
- Specified by:
nextParsedTokenin classBaseCOSParser- Returns:
- The next parsed basic type object from the stream or null if the next token is not a COSBase. Basic types are defined in Chap 7.3 of PDF 32000-1:2008
- Throws:
IOException- If there is an error during parsing.
-
nextNumberOrIndirectReference
- Returns:
- The next parsed numeric object from the stream or the next indirect object in case the number is an object number . Numeric objects are defined in Chap 7.3.3 of PDF 32000-1:2008. Indirect objects are defined in Chap 7.3.10 of PDF 32000-1:2008
- Throws:
IOException- If there is an error during parsing.- See Also:
-
provider
-
close
Closes the parser but not the associated provider- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSourceReader- Throws:
IOException
-