Methods Summary |
---|
public void | close()Closes the stream.
__client._closeOutputStream();
|
public void | flush()Flushes the stream.
__client._flushOutputStream();
|
public void | write(int ch)Writes a byte to the stream.
synchronized (__client)
{
ch &= 0xff;
if (__client._requestedWont(TelnetOption.BINARY))
{
if (__lastWasCR)
{
if (__convertCRtoCRLF)
{
__client._sendByte('\n");
if (ch == '\n")
{
__lastWasCR = false;
return ;
}
}
else if (ch != '\n")
__client._sendByte('\0");
}
__lastWasCR = false;
switch (ch)
{
case '\r":
__client._sendByte('\r");
__lastWasCR = true;
break;
case TelnetCommand.IAC:
__client._sendByte(TelnetCommand.IAC);
__client._sendByte(TelnetCommand.IAC);
break;
default:
__client._sendByte(ch);
break;
}
}
else if (ch == TelnetCommand.IAC)
{
__client._sendByte(ch);
__client._sendByte(TelnetCommand.IAC);
}
else
__client._sendByte(ch);
}
|
public void | write(byte[] buffer)Writes a byte array to the stream.
write(buffer, 0, buffer.length);
|
public 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.
synchronized (__client)
{
while (length-- > 0)
write(buffer[offset++]);
}
|