Package org.verapdf.parser
Class NotSeekableCOSParser
- java.lang.Object
-
- org.verapdf.parser.NotSeekableBaseParser
-
- org.verapdf.parser.NotSeekableCOSParser
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
PDFStreamParser
,PSParser
public class NotSeekableCOSParser extends NotSeekableBaseParser
Parser for COS objects that operates with a buffered stream. The seek() operation of stream is not required.- Author:
- Sergey Shemyakov
-
-
Field Summary
Fields Modifier and Type Field Description protected COSDocument
document
protected boolean
flag
protected Queue<Long>
integers
protected COSKey
keyOfCurrentObject
protected Queue<COSObject>
objects
-
Fields inherited from class org.verapdf.parser.NotSeekableBaseParser
isPSParser, source
-
-
Constructor Summary
Constructors Constructor Description NotSeekableCOSParser(ASInputStream stream)
NotSeekableCOSParser(ASInputStream stream, boolean isPSParser)
NotSeekableCOSParser(ASInputStream stream, COSDocument document)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected COSObject
getArray()
protected COSObject
getCloseDictionary()
protected COSObject
getDictionary()
protected COSObject
getName()
COSObject
nextObject()
Gets next object from the source.-
Methods inherited from class org.verapdf.parser.NotSeekableBaseParser
close, extendArray, findKeyword, findKeyword, getLineBytes, getToken, initializeToken, isCR, isDigit, isDigit, isEndOfComment, isFF, isLF, nextToken, readLine, readNumber, readUntilDelimiter, skipSpaces, skipSpaces, skipStreamSpaces
-
-
-
-
Constructor Detail
-
NotSeekableCOSParser
public NotSeekableCOSParser(ASInputStream stream) throws IOException
- Throws:
IOException
-
NotSeekableCOSParser
public NotSeekableCOSParser(ASInputStream stream, boolean isPSParser) throws IOException
- Throws:
IOException
-
NotSeekableCOSParser
public NotSeekableCOSParser(ASInputStream stream, COSDocument document) throws IOException
- Throws:
IOException
-
-
Method Detail
-
nextObject
public COSObject nextObject() throws IOException
Gets next object from the source.- Returns:
- next COSObject.
- Throws:
IOException
-
getArray
protected COSObject getArray() throws IOException
- Throws:
IOException
-
getName
protected COSObject getName() throws IOException
- Throws:
IOException
-
getCloseDictionary
protected COSObject getCloseDictionary()
-
getDictionary
protected COSObject getDictionary() throws IOException
- Throws:
IOException
-
-