Package com.amazon.ion.impl.bin.utf8
Class Utf8StringEncoder.Result
- java.lang.Object
-
- com.amazon.ion.impl.bin.utf8.Utf8StringEncoder.Result
-
- Enclosing class:
- Utf8StringEncoder
public static class Utf8StringEncoder.Result extends java.lang.ObjectRepresents the result of aUtf8StringEncoder.encode(String)operation.
-
-
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.intgetEncodedLength()
-
-
-
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 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().
-
-