Here you can find the source of loadObj(String file)
public static Object loadObj(String file) throws FileNotFoundException, IOException, ClassNotFoundException
//package com.java2s; //License from project: Apache License import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.ObjectInputStream; public class Main { public static Object loadObj(String file) throws FileNotFoundException, IOException, ClassNotFoundException { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file)); Object qa = ois.readObject(); ois.close();//w w w . j a va2s .c o m return qa; } }