org.apache.commons.net.io
public final class FromNetASCIIOutputStream extends FilterOutputStream
Because of the translation process, a call to flush() will
not flush the last byte written if that byte was a carriage
return. A call to {@link #close close() }, however, will
flush the carriage return.
| Constructor Summary | |
|---|---|
| FromNetASCIIOutputStream(OutputStream output)
Creates a FromNetASCIIOutputStream instance that wraps an existing
OutputStream.
| |
| Method Summary | |
|---|---|
| void | close()
Closes the stream, writing all pending data.
|
| void | write(int ch)
Writes a byte to the stream. |
| void | write(byte[] buffer)
Writes a byte array to the stream.
|
| void | write(byte[] buffer, int offset, int length)
Writes a number of bytes from a byte array to the stream starting from
a given offset.
|
Parameters: output The OutputStream to wrap.
Throws: IOException If an error occurs while closing the stream.
Parameters: ch The byte to write.
Throws: IOException If an error occurs while writing to the underlying stream.
Parameters: buffer The byte array to write.
Throws: IOException If an error occurs while writing to the underlying stream.
Parameters: buffer The byte array to write. offset The offset into the array at which to start copying data. length The number of bytes to write.
Throws: IOException If an error occurs while writing to the underlying stream.