public class JavaCharStream extends AbstractCharStream
| Modifier and Type | Field and Description |
|---|---|
protected Provider |
inputStream |
protected static int |
NEXTCHAR_BUF_SIZE
Predefined buffer size
|
protected char[] |
nextCharBuf |
protected int |
nextCharInd |
available, bufcolumn, buffer, BUFFER_INCREASE, bufline, bufpos, bufsize, column, DEFAULT_BUF_SIZE, inBuf, line, maxNextCharInd, prevCharIsCR, prevCharIsLF, tokenBegin| Constructor and Description |
|---|
JavaCharStream(Provider dstream)
Constructor.
|
JavaCharStream(Provider dstream,
int startline,
int startcolumn)
Constructor.
|
JavaCharStream(Provider dstream,
int startline,
int startcolumn,
int buffersize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustBuffSize() |
char |
beginToken() |
void |
done()
The lexer calls this function to indicate that it is done with the stream
and hence implementations can free any resources held by this class.
|
protected void |
fillBuff() |
protected char |
readByte() |
char |
readChar()
Read a character.
|
void |
reInit(Provider dstream)
Reinitialise.
|
void |
reInit(Provider dstream,
int startline,
int startcolumn)
Reinitialise.
|
void |
reInit(Provider dstream,
int startline,
int startcolumn,
int buffersize)
Reinitialise.
|
protected void |
streamClose() |
protected int |
streamRead(char[] buffer,
int offset,
int len) |
adjustBeginLineColumn, backup, expandBuff, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getSuffix, getTabSize, isTrackLineColumn, reInit, setTabSize, setTrackLineColumn, updateLineColumnprotected static final int NEXTCHAR_BUF_SIZE
protected char[] nextCharBuf
protected int nextCharInd
protected Provider inputStream
public JavaCharStream(Provider dstream, int startline, int startcolumn, int buffersize)
public JavaCharStream(Provider dstream, int startline, int startcolumn)
public JavaCharStream(Provider dstream)
protected int streamRead(char[] buffer,
int offset,
int len)
throws IOException
streamRead in class AbstractCharStreamIOExceptionprotected void streamClose()
throws IOException
streamClose in class AbstractCharStreamIOExceptionprotected void fillBuff()
throws IOException
fillBuff in class AbstractCharStreamIOExceptionprotected char readByte()
throws IOException
IOExceptionpublic char beginToken()
throws IOException
beginToken in interface CharStreambeginToken in class AbstractCharStreamIOExceptionprotected void adjustBuffSize()
public char readChar()
throws IOException
readChar in interface CharStreamreadChar in class AbstractCharStreamIOException - on IO errorpublic void reInit(Provider dstream)
public void reInit(Provider dstream, int startline, int startcolumn)
public void reInit(Provider dstream, int startline, int startcolumn, int buffersize)
public void done()
CharStreamdone in interface CharStreamdone in class AbstractCharStreamCopyright © 2017–2020 Philip Helger. All rights reserved.