public static Class<?> readClass(DataInput in) throws IOException, ClassNotFoundException {

    InternalDataSerializer.checkIn(in);

    byte typeCode = in.readByte();
    if (typeCode == DSCODE.CLASS.toByte()) {
      String className = readString(in);
      return InternalDataSerializer.getCachedClass(className);
    } else {
      return StaticSerialization.decodePrimitiveClass(typeCode);
    }
  }
Reads an instance of <code>Class</code> from a <code>DataInput</code>. The class will be loaded
using the {@linkplain Thread#getContextClassLoader current content class loader}. The return
value may be <code>null</code>.

@param in the {@link DataInput} to read from
@return the deserialized <code>Class</code>

@throws IOException A problem occurs while reading from <code>in</code>
@throws ClassNotFoundException The class cannot be loaded
geode-core/src/main/java/org/apache/geode/DataSerializer.java