Here you can find the source of deserialize(final File file)
@SuppressWarnings("unchecked") public static <O> O deserialize(final File file)
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; public class Main { @SuppressWarnings("unchecked") public static <O> O deserialize(final File file) { O o = null;// w ww . j a v a 2 s . c om try { final FileInputStream fileIn = new FileInputStream(file); final ObjectInputStream in = new ObjectInputStream(fileIn); o = (O) in.readObject(); in.close(); fileIn.close(); return o; } catch (IOException | ClassNotFoundException e) { throw new RuntimeException(e); } } }