
org.apache.commons.jexl3.parser.SimpleCharStream Maven / Gradle / Ivy
/* Generated by: ParserGeneratorCC: Do not edit this line. SimpleCharStream.java Version 1.1 */
/* ParserGeneratorCCOptions:SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package org.apache.commons.jexl3.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 Provider inputStream;
@Override
protected int streamRead (final char[] aBuf, final int nOfs, final int nLen) throws java.io.IOException
{
return inputStream.read (aBuf, nOfs, nLen);
}
@Override
protected void streamClose() throws java.io.IOException
{
inputStream.close ();
}
/** Constructor. */
public SimpleCharStream(final Provider dstream,
final int startline,
final int startcolumn,
final int buffersize)
{
super (startline, startcolumn, buffersize);
inputStream = dstream;
}
/** Constructor. */
public SimpleCharStream(final Provider dstream,
final int startline,
final int startcolumn)
{
this(dstream, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Constructor. */
public SimpleCharStream(final Provider dstream)
{
this(dstream, 1, 1, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final Provider dstream,
final int startline,
final int startcolumn,
final int buffersize)
{
inputStream = dstream;
super.reInit (startline, startcolumn, buffersize);
}
/** Reinitialise. */
public void reInit(final Provider dstream,
final int startline,
final int startcolumn)
{
reInit(dstream, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final Provider dstream)
{
reInit(dstream, 1, 1, DEFAULT_BUF_SIZE);
}
}
/* ParserGeneratorCC - OriginalChecksum=542026dd48959c684c77c4bfaffe536a (do not edit this line) */
© 2015 - 2025 Weber Informatics LLC | Privacy Policy