Class Utf8StringEncoder.Result

java.lang.Object
com.amazon.ion.impl.bin.utf8.Utf8StringEncoder.Result
Enclosing class:
Utf8StringEncoder

public static class Utf8StringEncoder.Result extends Object
Represents the result of a Utf8StringEncoder.encode(String) operation.
  • Constructor Details

    • Result

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

    • 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().