Package com.amazon.ion.impl.bin.utf8
Class Utf8StringEncoder.Result
java.lang.Object
com.amazon.ion.impl.bin.utf8.Utf8StringEncoder.Result
- Enclosing class:
Utf8StringEncoder
Represents the result of a
Utf8StringEncoder.encode(String) operation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns a byte array containing the encoded UTF-8 bytes starting at index 0.int
-
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 usegetEncodedLength()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().
-