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 voidaddStats(long bytes) Adds to the stats of this stream.longGets the number of bytes that may be written before the queue is full and blocks writes.voidclose()voidflush()Flushes all updates to this file to the underlying storage device.longGets the number of bytes written to this stream.longGets the number of writes performed on this stream.voidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(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:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
Flushes all updates to this file to the underlying storage device. This is performed byRandomAccessFile.getChannel().force(true).- Specified by:
flushin interfaceFlushable- Overrides:
flushin 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- See Also:
-