code: public static void saveConfig (File target, Serializable config)
          throws IOException
      {
          FileOutputStream fout = new FileOutputStream(target);
          ObjectOutputStream oout = new ObjectOutputStream(fout);
          oout.writeObject(config);
          oout.close();
      }
docs: Serializes the supplied configuration object to the specified file path.