Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* Generated by: ParserGeneratorCC: Do not edit this line. SimpleCharStream.java Version 1.1 */
/* ParserGeneratorCCOptions:SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package ru.yandex.clickhouse.jdbc.parser;
/**
* An implementation of interface CharStream, where the stream is assumed to
* contain only ASCII characters (without unicode processing).
*/
public
class SimpleCharStream extends AbstractCharStream
{
private java.io.Reader m_aIS;
/** Constructor. */
public SimpleCharStream(final java.io.Reader dstream,
final int startline,
final int startcolumn,
final int buffersize)
{
super (startline, startcolumn, buffersize);
m_aIS = dstream;
}
/** Constructor. */
public SimpleCharStream(final java.io.Reader dstream,
final int startline,
final int startcolumn)
{
this(dstream, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Constructor. */
public SimpleCharStream(final java.io.Reader dstream)
{
this(dstream, 1, 1, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.Reader dstream,
final int startline,
final int startcolumn,
final int buffersize)
{
m_aIS = dstream;
super.reInit (startline, startcolumn, buffersize);
}
/** Reinitialise. */
public void reInit(final java.io.Reader dstream,
final int startline,
final int startcolumn)
{
reInit(dstream, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.Reader dstream)
{
reInit(dstream, 1, 1, DEFAULT_BUF_SIZE);
}
/** Constructor. */
public SimpleCharStream(final java.io.InputStream dstream,
final java.nio.charset.Charset encoding,
final int startline,
final int startcolumn,
final int buffersize)
{
this(new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
/** Constructor. */
public SimpleCharStream(final java.io.InputStream dstream,
final java.nio.charset.Charset encoding,
final int startline,
final int startcolumn)
{
this(dstream, encoding, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Constructor. */
public SimpleCharStream(final java.io.InputStream dstream,
final java.nio.charset.Charset encoding)
{
this(dstream, encoding, 1, 1, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.InputStream dstream,
final java.nio.charset.Charset encoding)
{
reInit(dstream, encoding, 1, 1, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.InputStream dstream,
final java.nio.charset.Charset encoding,
final int startline,
final int startcolumn)
{
reInit(dstream, encoding, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.InputStream dstream,
final java.nio.charset.Charset encoding,
final int startline,
final int startcolumn,
final int buffersize)
{
reInit(new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
@Override
protected int streamRead (final char[] aBuf, final int nOfs, final int nLen) throws java.io.IOException
{
return m_aIS.read (aBuf, nOfs, nLen);
}
@Override
protected void streamClose () throws java.io.IOException
{
if (m_aIS != null)
m_aIS.close ();
}
}
/* ParserGeneratorCC - OriginalChecksum=f7b065d4d0f53ef9d156b950634eb4a2 (do not edit this line) */