Message.encode

Encodes up to {@code length} bytes of the message into the provided byte array, starting at position {@code offset}.

TODO describe what happens if length is smaller than the encoded form, Currently Proton-J throws an exception. What does Proton-C do?

@return the number of bytes written to the byte array

  1. int encode(byte[] data, int offset, int length)
    interface Message
    int
    encode
    (
    byte[] data
    ,
    int offset
    ,
    int length
    )
  2. int encode(WritableBuffer buffer)

Meta