docs: public static void serializeObjectToFile(Object object, String filename) {
      FileOutputStream fos = null;
      ObjectOutputStream out = null;
      try {
        fos = new FileOutputStream(filename);
        out = new ObjectOutputStream(fos);
        out.writeObject(object);
        out.close();
      } catch(IOException ex) {
        ex.printStackTrace();
        System.exit(1);
      }    
    }