public static Object deserializeObject(final byte[] objBytes, final ClassLoader loader)
      throws IOException, ClassNotFoundException {
    ObjectInputStream objIn = null;

    try {
      ByteArrayInputStream bis = new ByteArrayInputStream(objBytes);
      objIn = new ClassLoaderObjectInputStream(bis, loader);
      return objIn.readObject();
    } finally {
      close(objIn);
    }
  }
Convenience method to de-serialize a byte array back into an Object who's Class type is
resolved by the specific ClassLoader.
<p>

@param objBytes an array of bytes constituting the serialized form of the Object.
@param loader the ClassLoader used to resolve the Class type of the serialized Object.
@return a Serializable Object from the array of bytes.
@throws ClassNotFoundException if the Class type of the serialized Object cannot be resolved by
        the specified ClassLoader.
@throws IOException if an I/O error occurs while de-serializing the Object from the array of
        bytes.
@see #deserializeObject(byte[])
@see #serializeObject(Object)
@see IOUtils.ClassLoaderObjectInputStream
@see java.io.ByteArrayInputStream
@see java.io.Serializable
@see java.lang.ClassLoader
geode-core/src/main/java/org/apache/geode/internal/util/IOUtils.java