Methods Summary |
---|
public void | close()Flushes the underlying output, writing all buffered output, but doesn't
actually close the underlying stream. The underlying stream may still
be used for communicating with the server and therefore is not closed.
synchronized (lock)
{
if (__output == null)
return ;
if (__state == __LAST_WAS_CR_STATE)
__output.write('\n");
else if (__state != __LAST_WAS_NL_STATE)
__output.write("\r\n");
__output.write(".\r\n");
__output.flush();
__output = null;
}
|
public void | flush()Flushes the underlying output, writing all buffered output.
synchronized (lock)
{
__output.flush();
}
|
public void | write(int ch)Writes a character to the output. Note that a call to this method
may result in multiple writes to the underling Writer in order to
convert naked linefeeds to NETASCII line separators and to double
line-leading periods. This is transparent to the programmer and
is only mentioned for completeness.
synchronized (lock)
{
switch (ch)
{
case '\r":
__state = __LAST_WAS_CR_STATE;
__output.write('\r");
return ;
case '\n":
if (__state != __LAST_WAS_CR_STATE)
__output.write('\r");
__output.write('\n");
__state = __LAST_WAS_NL_STATE;
return ;
case '.":
// Double the dot at the beginning of a line
if (__state == __LAST_WAS_NL_STATE)
__output.write('.");
// Fall through
default:
__state = __NOTHING_SPECIAL_STATE;
__output.write(ch);
return ;
}
}
|
public void | write(char[] buffer, int offset, int length)Writes a number of characters from a character array to the output
starting from a given offset.
synchronized (lock)
{
while (length-- > 0)
write(buffer[offset++]);
}
|
public void | write(char[] buffer)Writes a character array to the output.
write(buffer, 0, buffer.length);
|
public void | write(java.lang.String string)Writes a String to the output.
write(string.toCharArray());
|
public void | write(java.lang.String string, int offset, int length)Writes part of a String to the output starting from a given offset.
write(string.toCharArray(), offset, length);
|