Class PeekInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class PeekInputStream
    extends java.io.InputStream
    Parsing-centric input stream.
    See Also:
    PeekReader
    • Method Detail

      • make

        public static PeekInputStream make​(java.io.InputStream inputStream)
      • make

        public static PeekInputStream make​(java.io.InputStream inputStream,
                                           int bufferSize)
      • getLineNum

        public long getLineNum()
      • getColNum

        public long getColNum()
      • getPosition

        public long getPosition()
      • peekByte

        public final int peekByte()
      • readByte

        public final int readByte()
      • pushbackByte

        public final void pushbackByte​(int b)
        push back a byte : does not alter underlying position, line or column counts
      • close

        public final void close()
                         throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public final int read()
                       throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public final int read​(byte[] buf,
                              int off,
                              int len)
                       throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • eof

        public final boolean eof()