com.vectorprint.configuration.generated.parser.SimpleCharStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Config Show documentation
Show all versions of Config Show documentation
A library for settings and parameterization of objects. Key features are support for data types,
help for settings and parameters, annotations for ease of use. Settings and parameters both are Clonable and Serializable.
More features for settings such as parsing
a settingsfile, being observable, readonliness, caching etc. are available. The library contains javacc generated
parsers for syntax support for properties, multi valued properties, parameterized objects and multi valued parameters.
The newest version!
/* Generated by: ParserGeneratorCC: Do not edit this line. SimpleCharStream.java Version 1.1 */
/* ParserGeneratorCCOptions:SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package com.vectorprint.configuration.generated.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 String encoding,
final int startline,
final int startcolumn,
final int buffersize) throws java.io.UnsupportedEncodingException
{
this(new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
/** Constructor. */
public SimpleCharStream(final java.io.InputStream dstream,
final String encoding,
final int startline,
final int startcolumn) throws java.io.UnsupportedEncodingException
{
this(dstream, encoding, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Constructor. */
public SimpleCharStream(final java.io.InputStream dstream,
final String encoding) throws java.io.UnsupportedEncodingException
{
this(dstream, encoding, 1, 1, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.InputStream dstream,
final String encoding) throws java.io.UnsupportedEncodingException
{
reInit(dstream, encoding, 1, 1, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.InputStream dstream,
final String encoding,
final int startline,
final int startcolumn) throws java.io.UnsupportedEncodingException
{
reInit(dstream, encoding, startline, startcolumn, DEFAULT_BUF_SIZE);
}
/** Reinitialise. */
public void reInit(final java.io.InputStream dstream,
final String encoding,
final int startline,
final int startcolumn,
final int buffersize) throws java.io.UnsupportedEncodingException
{
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=766f618fd9d4a11be0684f5925f4b440 (do not edit this line) */
© 2015 - 2025 Weber Informatics LLC | Privacy Policy