final class TelnetOutputStream extends OutputStream
In binary mode, the only conversion is to double IAC.
In ASCII mode, if convertCRtoCRLF is true (currently always true), any CR is converted to CRLF. IACs are doubled. Also, a bare LF is converted to CRLF and a bare CR is converted to CR\0
| Constructor and Description |
|---|
TelnetOutputStream(TelnetClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
void |
flush()
Flushes 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.
|
void |
write(int ch)
Writes a byte to the stream.
|
TelnetOutputStream(TelnetClient client)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void write(byte[] buffer)
throws IOException
write in class OutputStreambuffer - The byte array to write.IOException - If an error occurs while writing to the underlying stream.public void write(byte[] buffer,
int offset,
int length)
throws IOException
write in class OutputStreambuffer - The byte array to write.offset - The offset into the array at which to start copying data.length - The number of bytes to write.IOException - If an error occurs while writing to the underlying stream.public void write(int ch)
throws IOException
write in class OutputStreamch - The byte to write.IOException - If an error occurs while writing to the underlying stream.