FileWriter out = new FileWriter(file, false); out.close();
FileWriter outstream = new FileWriter(file, false); outstream.close();
   public void resetScreenFile(String directory) {      try {         File file = new File(getFileName(directory));         if (file.exists()) {            // Create an output writer that will write to that file.            // FileWriter handles international characters encoding conversions.            FileWriter out = new FileWriter(file, false);            out.close();         }      } catch (java.lang.Throwable ex) {         System.err.println("Display.cleanScreen():" + ex.getMessage());         try {            out.close();         } catch (Exception exc) {         }      }   }