java.lang.Object
java.io.OutputStream
com.aoapps.hodgepodge.io.FifoFileOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Author:
- AO Industries, Inc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addStats
(long bytes) Adds to the stats of this stream.long
Gets the number of bytes that may be written before the queue is full and blocks writes.void
close()
void
flush()
Flushes all updates to this file to the underlying storage device.long
Gets the number of bytes written to this stream.long
Gets the number of writes performed on this stream.void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
nullOutputStream
-
Method Details
-
getWriteCount
public long getWriteCount()Gets the number of writes performed on this stream. -
getWriteBytes
public long getWriteBytes()Gets the number of bytes written to this stream. -
addStats
protected void addStats(long bytes) Adds to the stats of this stream. -
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
Flushes all updates to this file to the underlying storage device. This is performed byRandomAccessFile.getChannel().force(true)
.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
- See Also:
-
available
Gets the number of bytes that may be written before the queue is full and blocks writes.- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
- See Also:
-