Interface ProtonJMessage

    • Method Detail

      • encode2

        int encode2​(byte[] data,
                    int offset,
                    int length)
      • encode

        int encode​(WritableBuffer buffer)
        Description copied from interface: Message
        Encodes the current Message contents into the given WritableBuffer instance.

        This method attempts to encode all message data into the WritableBuffer and if the buffer has insufficient space it will throw an exception to indicate the buffer overflow condition. If successful the method returns the number of bytes written to the provided buffer to fully encode the message.

        Specified by:
        encode in interface Message
        Parameters:
        buffer - The WritableBuffer instance to encode the message contents into.
        Returns:
        the number of bytes written to fully encode the message.