Package edu.rit.pj.cluster
Class BackendFileOutputStream
java.lang.Object
java.io.OutputStream
edu.rit.pj.cluster.BackendFileOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Class BackendFileOutputStream provides an object in a job backend process
that writes a sequential file in the job frontend process. A backend file
output stream is not constructed directly, rather it is created by a factory
method in class BackendFileWriter.
Note: Class BackendFileOutputStream does not do any buffering. Each method call sends a message to and receives a message from the job frontend. Consider layering a BufferedOutputStream on top of the BackendFileOutputStream.
- Version:
- 05-Nov-2006
- Author:
- Alan Kaminsky
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this output stream.voidflush()Flush this output stream.voidwrite(byte[] buf) Write the given byte array to this output stream.voidwrite(byte[] buf, int off, int len) Write a portion of the given byte array to this output stream.voidwrite(int b) Write the given byte to this output stream.Methods inherited from class java.io.OutputStream
nullOutputStream
-
Method Details
-
write
Write the given byte to this output stream. Only the least significant eight bits are written.- Specified by:
writein classOutputStream- Parameters:
b- Byte.- Throws:
IOException- Thrown if an I/O error occurred.IOException- if any.
-
write
Write the given byte array to this output stream.- Overrides:
writein classOutputStream- Parameters:
buf- Byte array.- Throws:
NullPointerException- (unchecked exception) Thrown ifbufis null.IOException- Thrown if an I/O error occurred.IOException- if any.
-
write
Write a portion of the given byte array to this output stream.- Overrides:
writein classOutputStream- Throws:
NullPointerException- (unchecked exception) Thrown ifbufis null.IndexOutOfBoundsException- (unchecked exception) Thrown ifoff< 0,len< 0, oroff+len>buf.length.IOException- Thrown if an I/O error occurred.
-
flush
Flush this output stream.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException- Thrown if an I/O error occurred.IOException- if any.
-
close
Close this output stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- Thrown if an I/O error occurred.IOException- if any.
-