Class SimpleCharStream

java.lang.Object
com.github.javaparser.AbstractCharStream
com.github.javaparser.SimpleCharStream
All Implemented Interfaces:
CharStream

public class SimpleCharStream extends AbstractCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
  • Constructor Details

    • SimpleCharStream

      public SimpleCharStream(Provider dstream, int startline, int startcolumn, int buffersize)
      Constructor.
    • SimpleCharStream

      public SimpleCharStream(Provider dstream, int startline, int startcolumn)
      Constructor.
    • SimpleCharStream

      public SimpleCharStream(Provider dstream)
      Constructor.
  • Method Details

    • streamRead

      protected int streamRead(char[] aBuf, int nOfs, int nLen) throws IOException
      Description copied from class: AbstractCharStream
      Read from the underlying stream.
      Specified by:
      streamRead in class AbstractCharStream
      Parameters:
      aBuf - the buffer to be filled
      nOfs - The offset into the buffer. 0-based
      nLen - Number of chars to read.
      Returns:
      Number of effective chars read, or -1 on error.
      Throws:
      IOException
    • streamClose

      protected void streamClose() throws IOException
      Description copied from class: AbstractCharStream
      Close the underlying stream.
      Specified by:
      streamClose in class AbstractCharStream
      Throws:
      IOException - If closing fails.
    • reInit

      public void reInit(Provider dstream, int startline, int startcolumn, int buffersize)
      Reinitialise.
    • reInit

      public void reInit(Provider dstream, int startline, int startcolumn)
      Reinitialise.
    • reInit

      public void reInit(Provider dstream)
      Reinitialise.