java.lang.Object
java.io.InputStream
com.aoapps.hodgepodge.io.FifoFileInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Author:
- AO Industries, Inc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddStats(long bytes) Adds to the stats of this stream.intDetermines the number of bytes that may be read without blocking.voidclose()longGets the number of bytes read from this stream.longGets the number of reads performed on this stream.intread()Reads data from the file, blocks until the data is available.intread(byte[] b) Reads data from the file, blocks until at least one byte is available.intread(byte[] b, int off, int len) Reads data from the file, blocks until at least one byte is available.longskip(long n) Skips data in the queue, blocks until at least one byte is skipped.Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
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
Reads data from the file, blocks until the data is available.- Specified by:
readin classInputStream- Throws:
IOException
-
read
Reads data from the file, blocks until at least one byte is available.- Overrides:
readin classInputStream- Throws:
IOException
-
read
Reads data from the file, blocks until at least one byte is available.- Overrides:
readin classInputStream- Throws:
IOException
-
skip
Skips data in the queue, blocks until at least one byte is skipped.- Overrides:
skipin classInputStream- Throws:
IOException
-
available
Determines the number of bytes that may be read without blocking.- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- See Also:
-
