code: @SuppressWarnings("unchecked")
    public static <T> T deserialize(byte[] serializedObjectBytes) throws ClassNotFoundException, IOException {
  
      ObjectInputStream in = null;
  
      try {
        in = new ObjectInputStream(new ByteArrayInputStream(serializedObjectBytes));
        return (T) in.readObject();
      }
      finally {
        close(in);
      }
    }
docs: Deserializes the given byte array back into an {@link Object} of the desired {@link Class} type.
  
  @param <T> class type of the object deserialized from the given bytes.
  @param serializedObjectBytes an array containing the bytes of a serialized object.
  @return a {@link java.io.Serializable} object from the array of bytes.
  @throws ClassNotFoundException if the class type of the serialized object cannot be resolved.
  @throws IOException if an I/O error occurs during the deserialization process.
  @throws NullPointerException if the serialized object byte array is null.
  @see #deserialize(byte[], ClassLoader)
  @see #serialize(Object)
  @see java.io.ByteArrayInputStream
  @see java.io.ObjectInputStream
  @see java.io.Serializable