code: @SuppressWarnings("unchecked")
    public <T> T readObject(BufferInput<?> buffer) {
      int code = buffer.readByte();
      Identifier identifier = Identifier.forCode(code);
      switch (identifier) {
        case NULL:
          return null;
        case CLASS:
          return readByClass(buffer);
        default:
          return readById(identifier.read(buffer), buffer);
      }
    }
docs: Reads an object from the given buffer.
  <p>
  The object will be read from the given buffer starting at the current {@link Buffer#position()}.
  <p>
  During deserialization, the buffer will first be read to determine the type to be deserialized. If the object was
  written using a serializable type ID, the given ID will be used to locate the serialized type. The type must have
  been {@link Serializer#register(Class) registered} with this {@link Serializer} instance in order to
  perform a reverse lookup.
  <p>
  If the type was written to the buffer with a fully qualified class name, the class name will be used to load the
  object class via {@link Class#forName(String)}. Serializable types must implement a no-argument constructor to be
  properly deserialized.
  <p>
  If the serialized type is an instance of {@link CatalystSerializable},
  {@link CatalystSerializable#readObject(BufferInput, Serializer)} will be used to
  read the object attributes from the buffer.
  <p>
  If the type is a {@link java.io.Serializable} type serialized with native Java serialization, it will be read from
  the buffer via {@link java.io.ObjectInputStream}.
  <p>
  For types that implement {@link ReferenceCounted}, the serializer will use an internal object pool
  to automatically pool and reuse reference counted types for deserialization. This means that users must release
  {@link ReferenceCounted} types back to the object pool via
  {@link ReferenceCounted#release()} or {@link ReferenceCounted#close()}
  once complete.
  
  @param buffer The buffer from which to read the object.
  @param <T> The object type.
  @return The read object.
  @throws SerializationException If no type could be read from the provided buffer.