All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vectorprint.configuration.generated.parser.SimpleCharStream Maven / Gradle / Ivy

Go to download

This project is about configuration of applications and about parameterization of Objects. This library offers annotations (and annotation processors), parsers, typing, observing changes, serialization, cloning and more when working with settings and/or object parameters. Settings and its features can be declared using an xml format. The library offers syntax support for settings and parameters in a loosely coupled manner. You are not restricted to built in syntax, you can provide your own. At runtime this library tracks keys for which a default is used because they are not found in settings. Also it tracks unused keys. You can stack features for settings such as caching, preparing keys and values, readonlyness, threadsafety, helpsupport, reading / parsing from input. You can easily develop your own features for settings.

There is a newer version: 12.2
Show 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 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=77b0f2d733c1137531154e15a652fcc0 (do not edit this line) */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy