private static Object readUserObject(DataInput in, int serializerId)
      throws IOException, ClassNotFoundException {
    DataSerializer serializer = InternalDataSerializer.getSerializer(serializerId);

    if (serializer == null) {
      throw new IOException(String.format("Serializer with Id %s is not registered", serializerId));
    }

    return serializer.fromData(in);
  }
Reads an object that was serialized by a customer ("user") {@code DataSerializer} from the
given {@code DataInput}.

@throws IOException If the serializer that can deserialize the object is not registered.
geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java