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 void
addStats
(long bytes) Adds to the stats of this stream.int
Determines the number of bytes that may be read without blocking.void
close()
long
Gets the number of bytes read from this stream.long
Gets the number of reads performed on this stream.int
read()
Reads data from the file, blocks until the data is available.int
read
(byte[] b) Reads data from the file, blocks until at least one byte is available.int
read
(byte[] b, int off, int len) Reads data from the file, blocks until at least one byte is available.long
skip
(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:
read
in classInputStream
- Throws:
IOException
-
read
Reads data from the file, blocks until at least one byte is available.- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
Reads data from the file, blocks until at least one byte is available.- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
Skips data in the queue, blocks until at least one byte is skipped.- Overrides:
skip
in classInputStream
- Throws:
IOException
-
available
Determines the number of bytes that may be read without blocking.- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
- See Also:
-