public void saveHistory(String filename) throws Exception {
  FileOutputStream fos=new FileOutputStream(filename);
  ObjectOutputStream oos=new ObjectOutputStream(fos);
  oos.writeObject(getHistory());
  oos.close();
}

public void saveHistory ( String filename ) throws Exception { FileOutputStream fos = new FileOutputStream ( filename ) ; ObjectOutputStream oos = new ObjectOutputStream ( fos ) ; oos . writeObject ( getHistory ( ) ) ; oos . close ( ) ; }
save the utilization history to a file .
