Package java.io
Class PrintStream
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.