Package org.verapdf.parser
Class BaseParser
java.lang.Object
org.verapdf.parser.BaseParser
- Direct Known Subclasses:
AFMParser,COSParser,FunctionParser
- Author:
- Timur Kamalov
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaseParser(InputStream fileStream) BaseParser(String fileName) BaseParser(SeekableInputStream stream) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendToToken(int ch) protected voidvoidprotected booleanfindKeyword(Token.Keyword keyword) protected booleanfindKeyword(Token.Keyword keyword, int lookUpSize) protected StringgetLine()protected StringgetLine(int offset) protected byte[]getRandomAccess(long length) static byte[]getRawBytes(String string) protected TokengetToken()protected voidprotected static booleanisCR(int c) protected booleanisDigit()protected static booleanisDigit(byte c) protected booleanisEOL(byte ch) protected static booleanisFF(int c) protected static booleanisHexDigit(byte ch) protected static booleanisLF(int c) protected booleanprotected voidnextLine()protected voidprotected voidreadName()protected voidprotected Stringprotected voidskipExpectedCharacter(char exp) protected voidprotected voidprotected booleanskipSingleSpace(boolean skipComment) protected voidprotected voidskipSpaces(boolean skipComment)
-
Field Details
-
source
-
-
Constructor Details
-
BaseParser
- Throws:
IOException
-
BaseParser
- Throws:
IOException
-
BaseParser
- Throws:
IOException
-
-
Method Details
-
closeInputStream
- Throws:
IOException
-
getToken
-
getLine
- Throws:
IOException
-
getLineBytes
- Throws:
IOException
-
getLine
- Throws:
IOException
-
readUntilDelimiter
- Throws:
IOException
-
findKeyword
- Throws:
IOException
-
findKeyword
- Throws:
IOException
-
nextToken
- Throws:
IOException
-
getRandomAccess
- Throws:
IOException
-
isNextByteEOL
- Throws:
IOException
-
skipSingleEol
- Throws:
IOException
-
skipSpaces
- Throws:
IOException
-
skipSingleSpace
- Throws:
IOException
-
skipSpaces
- Throws:
IOException
-
skipSingleSpace
- Throws:
IOException
-
isDigit
- Throws:
IOException
-
isDigit
protected static boolean isDigit(byte c) -
isHexDigit
protected static boolean isHexDigit(byte ch) -
isLF
protected static boolean isLF(int c) -
isCR
protected static boolean isCR(int c) -
isFF
protected static boolean isFF(int c) -
nextLine
- Throws:
IOException
-
isEOL
- Throws:
IOException
-
readName
- Throws:
IOException
-
readNumber
- Throws:
IOException
-
initializeToken
protected void initializeToken() -
clearToken
protected void clearToken() -
appendToToken
protected void appendToToken(int ch) -
getRawBytes
-
skipExpectedCharacter
- Throws:
IOException
-