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).
    • Field Detail

      • inputStream

        protected Provider inputStream
    • 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[] buffer,
                                 int offset,
                                 int len)
                          throws java.io.IOException
        Specified by:
        streamRead in class AbstractCharStream
        Throws:
        java.io.IOException
      • streamClose

        protected void streamClose()
                            throws java.io.IOException
        Specified by:
        streamClose in class AbstractCharStream
        Throws:
        java.io.IOException
      • fillBuff

        protected void fillBuff()
                         throws java.io.IOException
        Overrides:
        fillBuff in class AbstractCharStream
        Throws:
        java.io.IOException
      • readChar

        public char readChar()
                      throws java.io.IOException
        Read a character.
        Specified by:
        readChar in interface CharStream
        Overrides:
        readChar in class AbstractCharStream
        Returns:
        the next character from the selected input
        Throws:
        java.io.IOException - on IO error
      • 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.