public void save(){
  if (workspaceComponent.getCurrentFile() == null) {
    showSaveFileDialog();
  }
 else {
    try {
      FileOutputStream stream=new FileOutputStream(workspaceComponent.getCurrentFile());
      workspaceComponent.save(stream,null);
    }
 catch (    FileNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
}

public void save ( ) { if ( workspaceComponent . getCurrentFile ( ) == null ) { showSaveFileDialog ( ) ; } else { try { FileOutputStream stream = new FileOutputStream ( workspaceComponent . getCurrentFile ( ) ) ; workspaceComponent . save ( stream , null ) ; } catch ( FileNotFoundException e ) { throw new RuntimeException ( e ) ; } } }
save vs . save - as . saves the currentfile .
