Package java.io
Class PrintStream

Public Method close

void close()

Overrides:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Close this stream. This is done by flushing the stream and then closing the underlying output stream.

Description:

This method closes the stream. This is done by flushing the stream and then closing the underlying output stream.

Example

   File file = new File("testFile");
   String fileString = "Hello World";
   OutputStream fos = new FileOutputStream(file);
   PrintStream pw = new PrintStream(fos);
   ...
   ps.close();

The example above closes the stream.