| java.lang.Object java.io.OutputStream java.io.FilterOutputStream
All known Subclasses: java.util.zip.DeflaterOutputStream, java.io.BufferedOutputStream, java.io.DataOutputStream, java.security.DigestOutputStream, java.util.zip.CheckedOutputStream, java.io.PrintStream,
FilterOutputStream | public class FilterOutputStream extends OutputStream (Code) | | FilteredOutputStream is a class which takes an output stream and
filters the output in some way. The filtered view may be a
buffered output or one which compresses data before actually writing the
bytes. FilterOutputStreams are meant for byte streams.
See Also: FilterInputStream |
Field Summary | |
protected OutputStream | out The target OutputStream for this filter. |
Method Summary | |
public void | close() Close this FilterOutputStream. | public void | flush() Flush this FilterOutputStream to ensure all pending data is sent out to
the target OutputStream. | public void | write(byte buffer) Writes the entire contents of the byte array buffer to
this FilterOutputStream. | public void | write(byte buffer, int offset, int count) Writes count bytes from the byte array
buffer starting at offset to this
FilterOutputStream. | public void | write(int oneByte) Writes the specified byte oneByte to this
FilterOutputStream. |
FilterOutputStream | public FilterOutputStream(OutputStream out)(Code) | | Constructs a new FilterOutputStream on the OutputStream out .
All writes are now filtered through this stream.
Parameters: out - the target OutputStream to filter writes on. |
close | public void close() throws IOException(Code) | | Close this FilterOutputStream. This implementation closes the target
stream.
throws: IOException - If an error occurs attempting to close this stream. |
flush | public void flush() throws IOException(Code) | | Flush this FilterOutputStream to ensure all pending data is sent out to
the target OutputStream. This implementation flushes the target
OutputStream.
throws: IOException - If an error occurs attempting to flush thisFilterOutputStream. |
write | public void write(byte buffer) throws IOException(Code) | | Writes the entire contents of the byte array buffer to
this FilterOutputStream. This implementation writes the
buffer to the target stream.
Parameters: buffer - the buffer to be written throws: IOException - If an error occurs attempting to write to thisFilterOutputStream. |
write | public void write(byte buffer, int offset, int count) throws IOException(Code) | | Writes count bytes from the byte array
buffer starting at offset to this
FilterOutputStream. This implementation writes the buffer
to the target OutputStream.
Parameters: buffer - the buffer to be written Parameters: offset - offset in buffer to get bytes Parameters: count - number of bytes in buffer to write throws: IOException - If an error occurs attempting to write to thisFilterOutputStream. throws: IndexOutOfBoundsException - If offset or count are outside of bounds. |
write | public void write(int oneByte) throws IOException(Code) | | Writes the specified byte oneByte to this
FilterOutputStream. Only the low order byte of oneByte is
written. This implementation writes the byte to the target OutputStream.
Parameters: oneByte - the byte to be written throws: IOException - If an error occurs attempting to write to thisFilterOutputStream. |
|
|