Class Tokenizer
java.lang.Object
com.adobe.fontengine.font.postscript.Tokenizer
A postscript tokenizer.
Synchronization
This class is NOT threadsafe. Multiple instances can safely coexist without threadsafety issues, but each must only be accessed from one thread (or must be guarded by the client).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final bytedigitValue(byte c) byte[]findOptionalTokensAtStartOfLine(byte[][] tokenToFind) Looks for one of the tokens in tokenToFind in the current stream.voidfindToken(byte[] tokenToFind) static final booleanisDelimiter(int c) static final booleanisDigit(int c) static final booleanisExponent(int c) static final booleanisHex(int c) static final booleanisNewLine(int c) static final booleanisRadix(int c, int b) static final booleanisSign(int c) static final booleanisWhite(int c) intread()void
-
Constructor Details
-
Tokenizer
-
-
Method Details
-
isWhite
public static final boolean isWhite(int c) -
isNewLine
public static final boolean isNewLine(int c) -
isDelimiter
public static final boolean isDelimiter(int c) -
isSign
public static final boolean isSign(int c) -
isExponent
public static final boolean isExponent(int c) -
isDigit
public static final boolean isDigit(int c) -
isHex
public static final boolean isHex(int c) -
isRadix
public static final boolean isRadix(int c, int b) -
digitValue
public static final byte digitValue(byte c) -
getNextPSToken
-
findToken
- Throws:
IOExceptionInvalidFontException
-
findOptionalTokensAtStartOfLine
public byte[] findOptionalTokensAtStartOfLine(byte[][] tokenToFind) throws IOException, InvalidFontException Looks for one of the tokens in tokenToFind in the current stream. Will read until the end of the stream if none of the tokens is found.- Parameters:
tokenToFind-- Returns:
- the element in tokenToFind that was found, or null if none of the tokens was found.
- Throws:
IOExceptionInvalidFontException
-
read
- Throws:
IOExceptionInvalidFontException
-
setReader
- Throws:
InvalidFontException
-