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
-
Method Summary
Modifier and TypeMethodDescriptionstatic final byte
digitValue
(byte c) byte[]
findOptionalTokensAtStartOfLine
(byte[][] tokenToFind) Looks for one of the tokens in tokenToFind in the current stream.void
findToken
(byte[] tokenToFind) static final boolean
isDelimiter
(int c) static final boolean
isDigit
(int c) static final boolean
isExponent
(int c) static final boolean
isHex
(int c) static final boolean
isNewLine
(int c) static final boolean
isRadix
(int c, int b) static final boolean
isSign
(int c) static final boolean
isWhite
(int c) int
read()
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:
IOException
InvalidFontException
-
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:
IOException
InvalidFontException
-
read
- Throws:
IOException
InvalidFontException
-
setReader
- Throws:
InvalidFontException
-