Class FifoFileInputStream

java.lang.Object
java.io.InputStream
com.aoapps.hodgepodge.io.FifoFileInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class FifoFileInputStream extends InputStream
Author:
AO Industries, Inc.
See Also:
  • Method Details

    • getReadCount

      public long getReadCount()
      Gets the number of reads performed on this stream.
    • getReadBytes

      public long getReadBytes()
      Gets the number of bytes read from this stream.
    • addStats

      protected void addStats(long bytes)
      Adds to the stats of this stream.
    • read

      public int read() throws IOException
      Reads data from the file, blocks until the data is available.
      Specified by:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] b) throws IOException
      Reads data from the file, blocks until at least one byte is available.
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] b, int off, int len) throws IOException
      Reads data from the file, blocks until at least one byte is available.
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • skip

      public long skip(long n) throws IOException
      Skips data in the queue, blocks until at least one byte is skipped.
      Overrides:
      skip in class InputStream
      Throws:
      IOException
    • available

      public int available() throws IOException
      Determines the number of bytes that may be read without blocking.
      Overrides:
      available in class InputStream
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException
      See Also: