Class SimpleCharStream
-
- All Implemented Interfaces:
public class SimpleCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
-
-
Field Summary
Fields Modifier and Type Field Description public final static boolean
staticFlag
public int
bufpos
-
Constructor Summary
Constructors Constructor Description SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Constructor. SimpleCharStream(Reader dstream, int startline, int startcolumn)
Constructor. SimpleCharStream(Reader dstream)
Constructor. SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Constructor. SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Constructor. SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
Constructor. SimpleCharStream(InputStream dstream, int startline, int startcolumn)
Constructor. SimpleCharStream(InputStream dstream, String encoding)
Constructor. SimpleCharStream(InputStream dstream)
Constructor.
-
Method Summary
Modifier and Type Method Description char
BeginToken()
Start. char
readChar()
Read a character. int
getColumn()
int
getLine()
int
getEndColumn()
Get token end column number. int
getEndLine()
Get token end line number. int
getBeginColumn()
Get token beginning column number. int
getBeginLine()
Get token beginning line number. void
backup(int amount)
Backup a number of characters. void
ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
Reinitialise. void
ReInit(Reader dstream, int startline, int startcolumn)
Reinitialise. void
ReInit(Reader dstream)
Reinitialise. void
ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Reinitialise. void
ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
Reinitialise. void
ReInit(InputStream dstream, String encoding)
Reinitialise. void
ReInit(InputStream dstream)
Reinitialise. void
ReInit(InputStream dstream, String encoding, int startline, int startcolumn)
Reinitialise. void
ReInit(InputStream dstream, int startline, int startcolumn)
Reinitialise. String
GetImage()
Get token literal value. Array<char>
GetSuffix(int len)
Get the suffix. void
Done()
Reset buffer when finished. void
adjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token. -
-
Constructor Detail
-
SimpleCharStream
SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Constructor.
-
SimpleCharStream
SimpleCharStream(Reader dstream, int startline, int startcolumn)
Constructor.
-
SimpleCharStream
SimpleCharStream(Reader dstream)
Constructor.
-
SimpleCharStream
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Constructor.
-
SimpleCharStream
SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Constructor.
-
SimpleCharStream
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
Constructor.
-
SimpleCharStream
SimpleCharStream(InputStream dstream, int startline, int startcolumn)
Constructor.
-
SimpleCharStream
SimpleCharStream(InputStream dstream, String encoding)
Constructor.
-
SimpleCharStream
SimpleCharStream(InputStream dstream)
Constructor.
-
-
Method Detail
-
BeginToken
char BeginToken()
Start.
-
readChar
char readChar()
Read a character.
-
getColumn
@Deprecated() int getColumn()
-
getLine
@Deprecated() int getLine()
-
getEndColumn
int getEndColumn()
Get token end column number.
-
getEndLine
int getEndLine()
Get token end line number.
-
getBeginColumn
int getBeginColumn()
Get token beginning column number.
-
getBeginLine
int getBeginLine()
Get token beginning line number.
-
backup
void backup(int amount)
Backup a number of characters.
-
ReInit
void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Reinitialise.
-
ReInit
void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
Reinitialise.
-
ReInit
void ReInit(InputStream dstream, String encoding)
Reinitialise.
-
ReInit
void ReInit(InputStream dstream)
Reinitialise.
-
ReInit
void ReInit(InputStream dstream, String encoding, int startline, int startcolumn)
Reinitialise.
-
ReInit
void ReInit(InputStream dstream, int startline, int startcolumn)
Reinitialise.
-
Done
void Done()
Reset buffer when finished.
-
adjustBeginLineColumn
void adjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.
-
-
-
-