Class InputStreamBuffered

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

    public final class InputStreamBuffered
    extends java.io.InputStream
    InputStream optimizing for one byte at a time operation. java.io.BufferedInputStream operations have synchronization making reading one byte at a time expensive.
    See Also:
    InputStream, BufferedInputStream
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DFT_BUFSIZE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int advance()  
      void close()  
      int read()  
      • Methods inherited from class java.io.InputStream

        available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • DFT_BUFSIZE

        public static int DFT_BUFSIZE
    • Constructor Detail

      • InputStreamBuffered

        public InputStreamBuffered​(java.io.InputStream input)
      • InputStreamBuffered

        public InputStreamBuffered​(java.io.InputStream input,
                                   int bufsize)
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        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
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • advance

        public final int advance()