org.apache.batik.parser
public abstract class AbstractScanner extends Object
Field Summary | |
---|---|
protected int | blankCharacters
The characters to skip to create the string which represents the
current token. |
protected char[] | buffer
The recording buffer. |
protected int | current
The current char. |
protected int | end
The end offset of the last lexical unit. |
protected int | position
The current position in the buffer. |
protected int | previousType
The previous lexical unit type that was scanned. |
protected NormalizingReader | reader
The reader. |
protected int | start
The start offset of the last lexical unit. |
protected int | type
The type of the current lexical unit. |
Constructor Summary | |
---|---|
AbstractScanner(Reader r)
Creates a new AbstractScanner object. | |
AbstractScanner(InputStream is, String enc)
Creates a new AbstractScanner object. | |
AbstractScanner(String s)
Creates a new AbstractScanner object. |
Method Summary | |
---|---|
void | clearBuffer()
Clears the buffer. |
protected abstract int | endGap()
Returns the end gap of the current lexical unit. |
char[] | getBuffer()
Returns the buffer used to store the chars. |
int | getColumn()
Returns the current column. |
int | getEnd()
Returns the end offset of the last lexical unit. |
int | getLine()
Returns the current line. |
int | getStart()
Returns the start offset of the last lexical unit. |
String | getStringValue()
Returns the string representation of the current lexical unit. |
int | getType()
The current lexical unit type like defined in LexicalUnits. |
protected static boolean | isEqualIgnoreCase(int i, char c)
Compares the given int with the given character, ignoring case. |
int | next()
Returns the next token. |
protected int | nextChar()
Sets the value of the current char to the next character or -1 if the
end of stream has been reached. |
protected abstract void | nextToken()
Returns the next token. |
Parameters: r The reader to scan.
Parameters: is The input stream to scan. enc The encoding to use to decode the input stream, or null.
Parameters: s The string to scan.