Here you can find the source of deserializeFromByte(byte[] value)
@SuppressWarnings("unchecked") public static <V> V deserializeFromByte(byte[] value)
//package com.java2s; //License from project: Apache License import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; public class Main { @SuppressWarnings("unchecked") public static <V> V deserializeFromByte(byte[] value) { if (null == value || value.length <= 0) { return null; }/*from ww w . ja v a 2 s .c om*/ V reValue = null; ByteArrayInputStream bm = null; ObjectInputStream om = null; try { bm = new ByteArrayInputStream(value); om = new ObjectInputStream(bm); reValue = (V) om.readObject(); } catch (Exception e) { e.printStackTrace(); } finally { if (null != om) { try { om.close(); } catch (IOException e) { e.printStackTrace(); } } if (null != bm) { try { bm.close(); } catch (IOException e) { e.printStackTrace(); } } } return reValue; } }