Package io.camunda.zeebe.util
Class SbeUtil
java.lang.Object
io.camunda.zeebe.util.SbeUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteNested(BufferWriter writer, int headerLength, org.agrona.sbe.MessageEncoderFlyweight message, ByteOrder order) Writes aBufferWriterinstance as a nested field in an SBE message.
-
Method Details
-
writeNested
public static void writeNested(BufferWriter writer, int headerLength, org.agrona.sbe.MessageEncoderFlyweight message, ByteOrder order) Writes aBufferWriterinstance as a nested field in an SBE message. This can be useful to avoid intermediate copies to aDirectBufferinstance 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 writeheaderLength- the length of the header corresponding to the data we want to writemessage- the SBE message into which we should writeorder- the byte order
-