Class Tokenizer
- java.lang.Object
 - 
- com.adobe.fontengine.font.postscript.Tokenizer
 
 
- 
public final class Tokenizer extends java.lang.ObjectA 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 Constructor Description Tokenizer(FontInputStream is) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static bytedigitValue(byte c)byte[]findOptionalTokensAtStartOfLine(byte[][] tokenToFind)Looks for one of the tokens in tokenToFind in the current stream.voidfindToken(byte[] tokenToFind)TokengetNextPSToken()static booleanisDelimiter(int c)static booleanisDigit(int c)static booleanisExponent(int c)static booleanisHex(int c)static booleanisNewLine(int c)static booleanisRadix(int c, int b)static booleanisSign(int c)static booleanisWhite(int c)intread()voidsetReader(Reader newReader) 
 - 
 
- 
- 
Constructor Detail
- 
Tokenizer
public Tokenizer(FontInputStream is)
 
 - 
 
- 
Method Detail
- 
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
public Token getNextPSToken() throws InvalidFontException, java.io.IOException, java.lang.IndexOutOfBoundsException
- Throws:
 InvalidFontExceptionjava.io.IOExceptionjava.lang.IndexOutOfBoundsException
 
- 
findToken
public void findToken(byte[] tokenToFind) throws java.io.IOException, InvalidFontException- Throws:
 java.io.IOExceptionInvalidFontException
 
- 
findOptionalTokensAtStartOfLine
public byte[] findOptionalTokensAtStartOfLine(byte[][] tokenToFind) throws java.io.IOException, InvalidFontExceptionLooks 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:
 java.io.IOExceptionInvalidFontException
 
- 
read
public int read() throws java.io.IOException, InvalidFontException- Throws:
 java.io.IOExceptionInvalidFontException
 
- 
setReader
public void setReader(Reader newReader) throws InvalidFontException
- Throws:
 InvalidFontException
 
 - 
 
 -