@SuppressWarnings("unchecked")
  public static <T> T readObject(final DataInput in) throws IOException, ClassNotFoundException {
    return (T) InternalDataSerializer.basicReadObject(in);
  }
Reads an arbitrary object from a <code>DataInput</code>. Instances of classes that are not
handled specially (such as <code>String</code>, <code>Class</code>, and
<code>DataSerializable</code>) are read using standard Java {@linkplain java.io.Serializable
serialization}.

<P>

Note that if an object is deserialized using standard Java serialization, its class will be
loaded using the current thread's {@link Thread#getContextClassLoader context class loader}
before the one normally used by Java serialization is consulted.

@param <T> the type of the Object to read
@param in the {@link DataInput} to read from
@return an arbitrary deserialized object

@throws IOException A problem occurred while reading from <code>in</code> (may wrap another
        exception)
@throws ClassNotFoundException The class of an object read from <code>in</code> could not be
        found

@see #writeObject(Object, DataOutput)
@see ObjectInputStream#readObject()
geode-core/src/main/java/org/apache/geode/DataSerializer.java