Class Utf8StringEncoder.Result

    • Constructor Summary

      Constructors 
      Constructor Description
      Result​(int encodedLength, byte[] buffer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getBuffer()
      Returns a byte array containing the encoded UTF-8 bytes starting at index 0.
      int getEncodedLength()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Result

        public Result​(int encodedLength,
                      byte[] buffer)
    • Method Detail

      • getBuffer

        public byte[] getBuffer()
        Returns a byte array containing the encoded UTF-8 bytes starting at index 0. This byte array is NOT guaranteed to be the same length as the data it contains. Callers must use getEncodedLength() to determine the number of bytes that should be read from the byte array.
        Returns:
        the buffer containing UTF-8 bytes.
      • getEncodedLength

        public int getEncodedLength()
        Returns:
        the number of encoded bytes in the array returned by getBuffer().