code: public static Object readObject(File file) throws IOException,
              ClassNotFoundException {
          FileInputStream fileIn = new FileInputStream(file);
          ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(fileIn));
          try {
              return in.readObject();
          } finally {
              IoUtils.safeClose(in);
          }
      }
docs: To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!