org.apache.commons.net.io

Class FromNetASCIIOutputStream

public final class FromNetASCIIOutputStream extends FilterOutputStream

This class wraps an output stream, replacing all occurrences of <CR><LF> (carriage return followed by a linefeed), which is the NETASCII standard for representing a newline, with the local line separator representation. You would use this class to implement ASCII file transfers requiring conversion from NETASCII.

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 close() , however, will flush the carriage return.

Author: Daniel F. Savarese

Constructor Summary
FromNetASCIIOutputStream(OutputStream output)
Creates a FromNetASCIIOutputStream instance that wraps an existing OutputStream.

Constructor Detail

FromNetASCIIOutputStream

public FromNetASCIIOutputStream(OutputStream output)
Creates a FromNetASCIIOutputStream instance that wraps an existing OutputStream.

Parameters: output The OutputStream to wrap.