Java Reference
In-Depth Information
The println(java.lang.String x) method prints a string and then terminates the line. This
method behaves as though it invokes print(String) and then println() .
It has one parameter:
java.lang.String
The println(java.lang.Object x) Method
public void println(java.lang.Object x) throws java.io.IOException
The println(java.lang.Object x) method prints an object and then terminates the line. This
method behaves as though it invokes print(Object) and then println() .
It has one parameter:
java.lang.Object
The clear() Method
public void clear() throws java.io.IOException
The clear() method clears the contents of the buffer. If the buffer has been already been
flushed then the clear operation throws an IOException to signal the fact that some data has
already been irrevocably written to the client response stream. This method has no parameters
and returns no value.
It throws this exception:
java.io.IOException
The clearBuffer() Method
public void clearBuffer() throws java.io.IOException
The clearBuffer() method clears the current contents of the buffer. Unlike clear() ,this
method will not throw an IOException if the buffer has already been flushed. It merely clears
the current contents of the buffer and returns. This method has no parameters and returns no
value.
It throws this exception:
java.io.IOException
The flush() Method
public void flush() throws java.io.IOException
The flush() method flushes the stream. If the stream has saved any characters from the vari-
ous write() methods in a buffer, they are written immediately to their intended destination.
Then, if that destination is another character or byte stream, that stream is flushed. Thus one
Search WWH ::




Custom Search