public void serializeObject(Object o,File file) throws FileNotFoundException, IOException {
  logger.info("Writing cache to file: " + file.getAbsolutePath());
  ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream(file));
  oos.writeObject(o);
  oos.flush();
  oos.close();
}

public void serializeObject ( Object o , File file ) throws FileNotFoundException , IOException { logger . info ( "Writing cache to file: " + file . getAbsolutePath ( ) ) ; ObjectOutputStream oos = new ObjectOutputStream ( new FileOutputStream ( file ) ) ; oos . writeObject ( o ) ; oos . flush ( ) ; oos . close ( ) ; }
serializes the cache and saves it to the given file .
