Here you can find the source of deserialiseObject(File f)
public static Object deserialiseObject(File f) throws IOException, ClassNotFoundException
//package com.java2s; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; public class Main { public static Object deserialiseObject(File f) throws IOException, ClassNotFoundException { //use buffering InputStream file = new FileInputStream(f); InputStream buffer = new BufferedInputStream(file); ObjectInput input = new ObjectInputStream(buffer); //deserialize the List Object object = input.readObject(); input.close();/*from w ww. j a v a 2s . c o m*/ return object; } }