code: public static <T> T readObjectFromFile(File file) throws IOException,
    ClassNotFoundException {
      ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(
          new GZIPInputStream(new FileInputStream(file))));
      Object o = ois.readObject();
      ois.close();
      return ErasureUtils.<T> uncheckedCast(o);
    }
docs: Read an object from a stored file.
  
  @param file
  the file pointing to the object to be retrived
  @throws IOException
  If file cannot be read
  @throws ClassNotFoundException
  If reading serialized object fails
  @return the object read from the file.