edu.rit.pj.cluster
Class BackendFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- edu.rit.pj.cluster.BackendFileOutputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
public class BackendFileOutputStream extends java.io.OutputStreamClass 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()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.
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOExceptionWrite the given byte to this output stream. Only the least significant eight bits are written.- Specified by:
writein classjava.io.OutputStream- Parameters:
b- Byte.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
write
public void write(byte[] buf) throws java.io.IOExceptionWrite the given byte array to this output stream.- Overrides:
writein classjava.io.OutputStream- Parameters:
buf- Byte array.- Throws:
java.lang.NullPointerException- (unchecked exception) Thrown if buf is null.java.io.IOException- Thrown if an I/O error occurred.
-
write
public void write(byte[] buf, int off, int len) throws java.io.IOExceptionWrite a portion of the given byte array to this output stream.- Overrides:
writein classjava.io.OutputStream- Parameters:
buf- Byte array.off- Index of first byte to write.len- Number of bytes to write.- Throws:
java.lang.NullPointerException- (unchecked exception) Thrown if buf is null.java.lang.IndexOutOfBoundsException- (unchecked exception) Thrown if off < 0, len < 0, or off+len > buf.length.java.io.IOException- Thrown if an I/O error occurred.
-
flush
public void flush() throws java.io.IOExceptionFlush this output stream.- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
close
public void close() throws java.io.IOExceptionClose this output stream.- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
-
DMelt 3.0 © DataMelt by jWork.ORG