Package com.sun.jini.reliableLog
Class LogOutputStream
java.lang.Object
java.io.OutputStream
com.sun.jini.reliableLog.LogOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
This class extends the functionality of the java.io.OutputStream class in order to provide an
output mechanism that can be used by processes that perform logging operations; in particular,
processes that store state in order to provide persistence.
- Author:
- Sun Microsystems, Inc.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an output file with the specifiedRandomAccessFile -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
Constructor Details
-
LogOutputStream
Creates an output file with the specifiedRandomAccessFile- Parameters:
raf- the output file- Throws:
IOException- If an I/O error has occurred.
-
-
Method Details
-
write
Writes a byte of data. This method will block until the byte is actually written.- Specified by:
writein classOutputStream- Parameters:
b- the byte to be written- Throws:
IOException- If an I/O error has occurred.
-
write
Writes an array of bytes. Will block until the bytes are actually written.- Overrides:
writein classOutputStream- Parameters:
b- the data to be written- Throws:
IOException- If an I/O error has occurred.
-
write
Writes a sub-array of bytes.- Overrides:
writein classOutputStream- Parameters:
b- the data to be writtenoff- the start offset in the datalen- the number of bytes to write- Throws:
IOException- If an I/O error has occurred.
-
close
A LogOutputStream cannot be closed, so this does nothing.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- If an I/O error has occurred.
-