Here you can find the source of loadSerializableFile(File file)
public static synchronized Serializable loadSerializableFile(File file) throws IOException, ClassNotFoundException
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static synchronized Serializable loadSerializableFile(File file) throws IOException, ClassNotFoundException { Serializable result = null; ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file)); result = (Serializable) ois.readObject(); ois.close();//from w w w .j a va2 s .com return result; } }