code: public static void save(Object o, File file) {
          try {
              FileOutputStream fos = new FileOutputStream(file);
              ObjectOutputStream outStream = 
                  new ObjectOutputStream(new BufferedOutputStream(fos));
              outStream.writeObject(o);
              outStream.close();
          } catch (IOException ioe) {
              throw new IOError(ioe);
          }
      }
docs: Serializes the object to the provided file.
  
  @param o the object to be stored in the file
  @param file the file in which the object should be stored