Class SimpleCharStream
- java.lang.Object
-
- org.apache.qpid.server.query.engine.parsing.AbstractCharStream
-
- org.apache.qpid.server.query.engine.parsing.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 inherited from class org.apache.qpid.server.query.engine.parsing.AbstractCharStream
available, buffer, bufpos, bufsize, DEFAULT_BUF_SIZE, inBuf, maxNextCharInd, tokenBegin
-
-
Constructor Summary
Constructors Constructor Description SimpleCharStream(java.io.InputStream dstream, java.nio.charset.Charset encoding)Constructor.SimpleCharStream(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn)Constructor.SimpleCharStream(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn, int buffersize)Constructor.SimpleCharStream(java.io.Reader dstream)Constructor.SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn)Constructor.SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreInit(java.io.InputStream dstream, java.nio.charset.Charset encoding)Reinitialise.voidreInit(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn)Reinitialise.voidreInit(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn, int buffersize)Reinitialise.voidreInit(java.io.Reader dstream)Reinitialise.voidreInit(java.io.Reader dstream, int startline, int startcolumn)Reinitialise.voidreInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)Reinitialise.protected voidstreamClose()Close the underlying stream.protected intstreamRead(char[] aBuf, int nOfs, int nLen)Read from the underlying stream.-
Methods inherited from class org.apache.qpid.server.query.engine.parsing.AbstractCharStream
adjustBeginLineColumn, backup, beginToken, done, expandBuff, fillBuff, getBeginColumn, getBeginLine, getBufSizeAfterExpansion, getColumn, getEndColumn, getEndLine, getImage, getLine, getSuffix, getTabSize, internalAdjustBuffSize, internalSetBufLineColumn, internalUpdateLineColumn, isTrackLineColumn, readChar, reInit, setTabSize, setTrackLineColumn
-
-
-
-
Constructor Detail
-
SimpleCharStream
public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize)Constructor.
-
SimpleCharStream
public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn)Constructor.
-
SimpleCharStream
public SimpleCharStream(java.io.Reader dstream)
Constructor.
-
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn, int buffersize)Constructor.
-
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn)Constructor.
-
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream, java.nio.charset.Charset encoding)Constructor.
-
-
Method Detail
-
reInit
public void reInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)Reinitialise.
-
reInit
public void reInit(java.io.Reader dstream, int startline, int startcolumn)Reinitialise.
-
reInit
public void reInit(java.io.Reader dstream)
Reinitialise.
-
reInit
public void reInit(java.io.InputStream dstream, java.nio.charset.Charset encoding)Reinitialise.
-
reInit
public void reInit(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn)Reinitialise.
-
reInit
public void reInit(java.io.InputStream dstream, java.nio.charset.Charset encoding, int startline, int startcolumn, int buffersize)Reinitialise.
-
streamRead
protected int streamRead(char[] aBuf, int nOfs, int nLen) throws java.io.IOExceptionDescription copied from class:AbstractCharStreamRead from the underlying stream.- Specified by:
streamReadin classAbstractCharStream- Parameters:
aBuf- the buffer to be fillednOfs- The offset into the buffer. 0-basednLen- Number of chars to read.- Returns:
- Number of effective chars read, or -1 on error.
- Throws:
java.io.IOException
-
streamClose
protected void streamClose() throws java.io.IOExceptionDescription copied from class:AbstractCharStreamClose the underlying stream.- Specified by:
streamClosein classAbstractCharStream- Throws:
java.io.IOException- If closing fails.
-
-