code: @SneakyThrows(IOException.class)
      public ByteBuffer toByteBuffer(ControllerEvent value) {
          ByteArraySegment s = serialize(value);
          return ByteBuffer.wrap(s.array(), s.arrayOffset(), s.getLength());
      }
docs: Serializes the given {@link ControllerEvent} to a {@link ByteBuffer}.
  
  @param value The {@link ControllerEvent} to serialize.
  @return A new {@link ByteBuffer} wrapping an array that contains the serialization.