Interface UTF8Decoder


  • public interface UTF8Decoder
    Interface for an external UTF8 Decoder that can be supplied by a client which implements custom decoding logic optimized for the application using the Codec.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String decodeUTF8​(ProtonBuffer buffer, int utf8length)
      Decodes a String from the given UTF8 Bytes advancing the buffer read index by the given length value once complete.
    • Method Detail

      • decodeUTF8

        java.lang.String decodeUTF8​(ProtonBuffer buffer,
                                    int utf8length)
        Decodes a String from the given UTF8 Bytes advancing the buffer read index by the given length value once complete. If the implementation does not advance the buffer read index the outcome of future decode calls is not defined.
        Parameters:
        buffer - A ProtonBuffer containing the UTF-8 encoded bytes.
        utf8length - The number of bytes in the passed buffer that comprise the UTF-8 encoded value.
        Returns:
        a new String that represents the decoded value.