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 java.io.Reader inputStream
    • 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.lang.String encoding,
                                int startline,
                                int startcolumn,
                                int buffersize)
                         throws java.io.UnsupportedEncodingException
        Constructor.
        Throws:
        java.io.UnsupportedEncodingException
      • SimpleCharStream

        public SimpleCharStream​(java.io.InputStream dstream,
                                java.lang.String encoding,
                                int startline,
                                int startcolumn)
                         throws java.io.UnsupportedEncodingException
        Constructor.
        Throws:
        java.io.UnsupportedEncodingException
      • SimpleCharStream

        public SimpleCharStream​(java.io.InputStream dstream,
                                java.lang.String encoding)
                         throws java.io.UnsupportedEncodingException
        Constructor.
        Throws:
        java.io.UnsupportedEncodingException
    • 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​(java.io.Reader dstream)
        Reinitialise.
      • reInit

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

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

        public void reInit​(java.io.InputStream dstream,
                           java.lang.String encoding)
                    throws java.io.UnsupportedEncodingException
        Reinitialise.
        Throws:
        java.io.UnsupportedEncodingException
      • reInit

        public void reInit​(java.io.InputStream dstream,
                           java.lang.String encoding,
                           int startline,
                           int startcolumn)
                    throws java.io.UnsupportedEncodingException
        Reinitialise.
        Throws:
        java.io.UnsupportedEncodingException
      • reInit

        public void reInit​(java.io.InputStream dstream,
                           java.lang.String encoding,
                           int startline,
                           int startcolumn,
                           int buffersize)
                    throws java.io.UnsupportedEncodingException
        Reinitialise.
        Throws:
        java.io.UnsupportedEncodingException