Class 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 Detail

      • SimpleCharStream

        public SimpleCharStream​(java.io.Reader dstream,
                                int startline,
                                int startcolumn,
                                int buffersize)
        Constructor.
      • SimpleCharStream

        public SimpleCharStream​(java.io.Reader dstream,
                                int startline,
                                int startcolumn)
        Constructor.
      • SimpleCharStream

        public SimpleCharStream​(java.io.Reader dstream)
        Constructor.
      • SimpleCharStream

        public SimpleCharStream​(java.io.InputStream dstream,
                                java.nio.charset.Charset encoding,
                                int startline,
                                int startcolumn,
                                int buffersize)
        Constructor.
      • SimpleCharStream

        public SimpleCharStream​(java.io.InputStream dstream,
                                java.nio.charset.Charset encoding,
                                int startline,
                                int startcolumn)
        Constructor.
      • SimpleCharStream

        public SimpleCharStream​(java.io.InputStream dstream,
                                java.nio.charset.Charset encoding)
        Constructor.
    • Method Detail

      • reInit

        public void reInit​(java.io.Reader dstream,
                           int startline,
                           int startcolumn,
                           int buffersize)
        Reinitialise.
      • reInit

        public void reInit​(java.io.Reader dstream,
                           int startline,
                           int startcolumn)
        Reinitialise.
      • reInit

        public void reInit​(java.io.Reader dstream)
        Reinitialise.
      • reInit

        public void reInit​(java.io.InputStream dstream,
                           java.nio.charset.Charset encoding)
        Reinitialise.
      • reInit

        public void reInit​(java.io.InputStream dstream,
                           java.nio.charset.Charset encoding,
                           int startline,
                           int startcolumn)
        Reinitialise.
      • reInit

        public void reInit​(java.io.InputStream dstream,
                           java.nio.charset.Charset encoding,
                           int startline,
                           int startcolumn,
                           int buffersize)
        Reinitialise.
      • streamRead

        protected int streamRead​(char[] aBuf,
                                 int nOfs,
                                 int nLen)
                          throws java.io.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:
        java.io.IOException
      • streamClose

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