Package org.verapdf.parser
Class BaseParser
java.lang.Object
org.verapdf.parser.BaseParser
- Direct Known Subclasses:
NotSeekableBaseParser,SeekableBaseParser
- Author:
- Maxim Plushchov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected BaseParserInputStreamprotected Token -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendToToken(int ch) protected voidappendToToken(int ch, boolean append) protected voidprotected voiddecodeASCII85(ASInputStream ascii85, int length) protected booleanfindKeyword(Token.Keyword keyword) protected abstract booleanfindKeyword(Token.Keyword keyword, int lookUpSize) protected StringgetErrorMessage(String message) protected StringgetLine()protected byte[]protected BaseParserInputStreamgetToken()voidstatic booleanisCR(int c) protected booleanisDigit()protected static booleanisDigit(byte c) static booleanisFF(int c) protected static booleanisLF(int c) protected booleanvoidprotected abstract voidprotected voidreadName()protected voidprotected Stringprotected abstract voidprotected booleanskipSingleSpace(boolean skipComment) protected voidvoidskipSpaces(boolean skipComment)
-
Field Details
-
isPSParser
protected boolean isPSParser -
token
-
source
-
-
Constructor Details
-
BaseParser
public BaseParser()
-
-
Method Details
-
getToken
-
initializeToken
public void initializeToken() -
appendToToken
protected void appendToToken(int ch, boolean append) -
appendToToken
protected void appendToToken(int ch) -
clearToken
protected void clearToken() -
readUntilDelimiter
- Throws:
IOException
-
findKeyword
- Throws:
IOException
-
findKeyword
- Throws:
IOException
-
skipSpaces
- Throws:
IOException
-
skipSpaces
- Throws:
IOException
-
skipSingleSpace
- Throws:
IOException
-
skipComment
- Throws:
IOException
-
isDigit
- Throws:
IOException
-
isDigit
protected static boolean isDigit(byte c) -
isLF
protected static boolean isLF(int c) -
isCR
public static boolean isCR(int c) -
isFF
public static boolean isFF(int c) -
readASCII85
- Throws:
IOException
-
decodeASCII85
- Throws:
IOException
-
nextToken
- Throws:
IOException
-
getLine
- Throws:
IOException
-
getLineBytes
- Throws:
IOException
-
readNumber
- Throws:
IOException
-
readName
- Throws:
IOException
-
getErrorMessage
-
getSource
-
isPSParser
protected boolean isPSParser()
-