code: @Override
    public <T> ByteBuffer serialize(final Serializer<T> serializer, final T value)
      throws IOException {
      try (final BytesSerialWriter writer = writeBytes()) {
        serializer.serialize(writer, value);
        return writer.toByteBuffer();
      }
    }
docs: /* utility functions