Package org.verapdf.parser
Class NotSeekableBaseParser
java.lang.Object
org.verapdf.parser.BaseParser
org.verapdf.parser.NotSeekableBaseParser
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
CMapBaseParser,Type3CharProcParser
Base PDF parser that operates with a buffered stream. The seek() operation
of stream is not required.
- Author:
- Sergey Shemyakov
-
Field Summary
Fields inherited from class org.verapdf.parser.BaseParser
isPSParser, source, token -
Constructor Summary
ConstructorsConstructorDescriptionNotSeekableBaseParser(ASInputStream stream) Constructor from stream.NotSeekableBaseParser(ASInputStream fileStream, boolean isPSParser) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes source stream.static byte[]extendArray(byte[] array) protected booleanfindKeyword(Token.Keyword keyword, int lookUpSize) protected ASBufferedInFilterprotected booleanisEndOfComment(byte ch) protected voidprotected voidprotected voidMethods inherited from class org.verapdf.parser.BaseParser
appendToToken, appendToToken, clearToken, decodeASCII85, findKeyword, getErrorMessage, getLine, getLineBytes, getToken, initializeToken, isCR, isDigit, isDigit, isFF, isLF, isPSParser, nextToken, readName, readNumber, readUntilDelimiter, skipSingleSpace, skipSpaces, skipSpaces
-
Constructor Details
-
NotSeekableBaseParser
Constructor from stream. New buffered stream from given stream is created.- Parameters:
stream- is source data stream.- Throws:
IOException
-
NotSeekableBaseParser
- Throws:
IOException
-
-
Method Details
-
close
Closes source stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
findKeyword
- Specified by:
findKeywordin classBaseParser- Throws:
IOException
-
skipStreamSpaces
- Throws:
IOException
-
skipComment
- Specified by:
skipCommentin classBaseParser- Throws:
IOException
-
isEndOfComment
protected boolean isEndOfComment(byte ch) -
readASCII85
- Specified by:
readASCII85in classBaseParser- Throws:
IOException
-
extendArray
public static byte[] extendArray(byte[] array) -
getSource
- Overrides:
getSourcein classBaseParser
-