Class SbeUtil

java.lang.Object
io.camunda.zeebe.util.SbeUtil

public final class SbeUtil extends Object
  • Method Details

    • writeNested

      public static void writeNested(BufferWriter writer, int headerLength, org.agrona.sbe.MessageEncoderFlyweight message, ByteOrder order)
      Writes a BufferWriter instance as a nested field in an SBE message. This can be useful to avoid intermediate copies to a DirectBuffer instance and using the encoder to write the copy. This can also be used to write nested SBE messages as well.

      NOTE: variable length data in SBE is written/read in order. This method should be called as well in the right order so the data is written at the right offset.

      Parameters:
      writer - the data to write
      headerLength - the length of the header corresponding to the data we want to write
      message - the SBE message into which we should write
      order - the byte order