Class UTF8StringEncoding

    • Constructor Detail

      • UTF8StringEncoding

        public UTF8StringEncoding()
    • Method Detail

      • encode

        public byte[] encode​(java.lang.String str)
        Description copied from interface: StringEncoding
        called when a string is to be encoded to a byte array.
        Parameters:
        str - the string to encode
        Returns:
        the encoded byte array
      • decode

        public java.lang.String decode​(byte[] bytes,
                                       int start,
                                       int length)
        Description copied from interface: StringEncoding
        called when a byte array is to be decoded to a string.
        Parameters:
        bytes - the byte array
        start - the start offset in the byte array
        length - the length of the encoded string in the byte array
        Returns:
        the string