Here you can find the source of deserializeFromStram(InputStream inputStram)
public static Object deserializeFromStram(InputStream inputStram) throws IOException, ClassNotFoundException
//package com.java2s; //License from project: Apache License import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; public class Main { public static Object deserializeFromStram(InputStream inputStram) throws IOException, ClassNotFoundException { ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(inputStram)); Object ret = in.readObject(); in.close();//from ww w.j av a2 s . c om return ret; } }