code: public static File writeObjectToFile(Object o, File file) throws IOException {
      return writeObjectToFile(o, file, false);
    }
docs: Write an object to a specified File.
  
  @param o
  object to be written to file
  @param file
  The temp File
  @throws IOException
  If File cannot be written
  @return File containing the object