Class CharStreamReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable, CharStream
    Direct Known Subclasses:
    CharStreamBasic, CharStreamBuffered

    public abstract class CharStreamReader
    extends java.io.Reader
    implements CharStream
    Machinery to add Reader functionality to a CharStream. No synchronized is used for read().
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract int advance()  
      void close()  
      abstract void closeStream()
      Close the stream - different name from java.io.Reader.close
      int read()  
      int read​(char[] cbuf, int off, int len)  
      boolean ready()  
      • Methods inherited from class java.io.Reader

        mark, markSupported, nullReader, read, read, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CharStreamReader

        public CharStreamReader()
    • Method Detail

      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        Specified by:
        read in class java.io.Reader
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.Reader
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Reader
        Throws:
        java.io.IOException
      • ready

        public boolean ready()
                      throws java.io.IOException
        Overrides:
        ready in class java.io.Reader
        Throws:
        java.io.IOException
      • advance

        public abstract int advance()
        Specified by:
        advance in interface CharStream
      • closeStream

        public abstract void closeStream()
        Description copied from interface: CharStream
        Close the stream - different name from java.io.Reader.close
        Specified by:
        closeStream in interface CharStream