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​(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 Detail

      • 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
      • 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.