Package org.drools.mvel.parser
Class SimpleCharStream
- java.lang.Object
-
- org.drools.mvel.parser.AbstractCharStream
-
- org.drools.mvel.parser.SimpleCharStream
-
- All Implemented Interfaces:
CharStream
public class SimpleCharStream extends AbstractCharStream
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 protected ProviderinputStream-
Fields inherited from class org.drools.mvel.parser.AbstractCharStream
available, bufcolumn, buffer, bufline, bufpos, bufsize, column, DEFAULT_BUF_SIZE, inBuf, line, maxNextCharInd, nextCharBuf, nextCharInd, prevCharIsCR, prevCharIsLF, tokenBegin
-
-
Constructor Summary
Constructors Constructor Description SimpleCharStream(Provider dstream)Constructor.SimpleCharStream(Provider dstream, int startline, int startcolumn)Constructor.SimpleCharStream(Provider dstream, int startline, int startcolumn, int buffersize)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfillBuff()charreadChar()Read a character.voidreInit(Provider dstream)Reinitialise.voidreInit(Provider dstream, int startline, int startcolumn)Reinitialise.voidreInit(Provider dstream, int startline, int startcolumn, int buffersize)Reinitialise.protected voidstreamClose()protected intstreamRead(char[] buffer, int offset, int len)-
Methods inherited from class org.drools.mvel.parser.AbstractCharStream
adjustBeginLineColumn, backup, beginToken, done, expandBuff, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getSuffix, getTabSize, isTrackLineColumn, reInit, setTabSize, setTrackLineColumn, updateLineColumn
-
-
-
-
Field Detail
-
inputStream
protected Provider inputStream
-
-
Constructor Detail
-
SimpleCharStream
public SimpleCharStream(Provider dstream, int startline, int startcolumn, int buffersize)
Constructor.
-
SimpleCharStream
public SimpleCharStream(Provider dstream, int startline, int startcolumn)
Constructor.
-
SimpleCharStream
public SimpleCharStream(Provider dstream)
Constructor.
-
-
Method Detail
-
streamRead
protected int streamRead(char[] buffer, int offset, int len) throws IOException- Specified by:
streamReadin classAbstractCharStream- Throws:
IOException
-
streamClose
protected void streamClose() throws IOException- Specified by:
streamClosein classAbstractCharStream- Throws:
IOException
-
fillBuff
protected void fillBuff() throws IOException- Overrides:
fillBuffin classAbstractCharStream- Throws:
IOException
-
readChar
public char readChar() throws IOExceptionRead a character.- Specified by:
readCharin interfaceCharStream- Overrides:
readCharin classAbstractCharStream- Returns:
- the next character from the selected input
- Throws:
IOException- on IO error
-
reInit
public void reInit(Provider dstream, int startline, int startcolumn, int buffersize)
Reinitialise.
-
reInit
public void reInit(Provider dstream, int startline, int startcolumn)
Reinitialise.
-
reInit
public void reInit(Provider dstream)
Reinitialise.
-
-