Package com.clickhouse.jdbc.parser
Class SimpleCharStream
java.lang.Object
com.clickhouse.jdbc.parser.AbstractCharStream
com.clickhouse.jdbc.parser.SimpleCharStream
- All Implemented Interfaces:
CharStream
An implementation of interface CharStream, where the stream is assumed to
contain only ASCII characters (without unicode processing).
-
Field Summary
Fields inherited from class com.clickhouse.jdbc.parser.AbstractCharStream
available, buffer, bufpos, bufsize, DEFAULT_BUF_SIZE, inBuf, maxNextCharInd, tokenBegin -
Constructor Summary
ConstructorsConstructorDescriptionSimpleCharStream(InputStream dstream, Charset encoding) Constructor.SimpleCharStream(InputStream dstream, Charset encoding, int startline, int startcolumn) Constructor.SimpleCharStream(InputStream dstream, Charset encoding, int startline, int startcolumn, int buffersize) Constructor.SimpleCharStream(Reader dstream) Constructor.SimpleCharStream(Reader dstream, int startline, int startcolumn) Constructor.SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidreInit(InputStream dstream, Charset encoding) Reinitialise.voidreInit(InputStream dstream, Charset encoding, int startline, int startcolumn) Reinitialise.voidreInit(InputStream dstream, Charset encoding, int startline, int startcolumn, int buffersize) Reinitialise.voidReinitialise.voidReinitialise.voidReinitialise.protected voidClose the underlying stream.protected intstreamRead(char[] aBuf, int nOfs, int nLen) Read from the underlying stream.Methods inherited from class com.clickhouse.jdbc.parser.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 Details
-
SimpleCharStream
Constructor. -
SimpleCharStream
Constructor. -
SimpleCharStream
Constructor. -
SimpleCharStream
public SimpleCharStream(InputStream dstream, Charset encoding, int startline, int startcolumn, int buffersize) Constructor. -
SimpleCharStream
Constructor. -
SimpleCharStream
Constructor.
-
-
Method Details
-
reInit
Reinitialise. -
reInit
Reinitialise. -
reInit
Reinitialise. -
reInit
Reinitialise. -
reInit
Reinitialise. -
reInit
public void reInit(InputStream dstream, Charset encoding, int startline, int startcolumn, int buffersize) Reinitialise. -
streamRead
Description 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:
IOException
-
streamClose
Description copied from class:AbstractCharStreamClose the underlying stream.- Specified by:
streamClosein classAbstractCharStream- Throws:
IOException- If closing fails.
-