Here you can find the source of deserialize(@Nullable final byte[] binaryInput)
@Nullable public static Object deserialize(@Nullable final byte[] binaryInput)
//package com.java2s; //License from project: Apache License import javax.annotation.Nullable; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; public class Main { @Nullable public static Object deserialize(@Nullable final byte[] binaryInput) { return (binaryInput != null) ? deserialize(new ByteArrayInputStream(binaryInput)) : null; }/*from w w w. j a v a 2 s . co m*/ @Nullable public static Object deserialize(@Nullable final InputStream binaryInput) { if (null == binaryInput) { return null; } try { ObjectInputStream in = new ObjectInputStream(binaryInput); try { return in.readObject(); } finally { in.close(); } } catch (IOException ex) { throw new IllegalStateException("Unable to read in persisted object", ex); } catch (ClassNotFoundException ex) { throw new IllegalStateException("Unable to load class for persisted object", ex); } } }