out.write(text); out.close();
outstream.write(text); outstream.close();
   boolean saveFile() {      if (jFileChooser1 == null) {         jFileChooser1 = new JFileChooser("./");         // Full path with filename. null means new / untitled.      }      // Handle the case where we don't have a file name yet.      if (currFileName == null) {         return saveAsFile();      }      try {         // Open a file of the current name.         File file = new File(currFileName);         // Create an output writer that will write to that file.         // FileWriter handles international characters encoding conversions.         FileWriter out = new FileWriter(file);         String text = screen.getText();         out.write(text);         out.close();         this.dirty = false;         return true;      } catch (IOException e) {         org.smartfrog.services.display.WindowUtilities.showError(this,               "Error saving file!");      }      return false;   }