Package java.io
Class PrintWriter

Public Method checkError

boolean checkError()

_INSERT_METHOD_SIGNATURE_HERE_

Description:

This method flushes the stream and check its error state. Once the stream encounters an error, this routine will return true on all successive calls.

Example

   File file = new File("testFile");
   String fileString = "Hello World";
   OutputStream fos = new FileOutputStream(file);
   PrintWriter pw = new PrintWriter(fos);
   ...
   if (pw.checkError())       Console.println("Error");

The example above checks a occured error.