public interface RawValue extends Value
StringValue
and BinaryValue
interfaces.
MessagePack's Raw type can represent a byte array at most 264-1 bytes.StringValue
,
BinaryValue
Modifier and Type | Method and Description |
---|---|
byte[] |
asByteArray()
Returns the value as
byte[] . |
java.nio.ByteBuffer |
asByteBuffer()
Returns the value as
ByteBuffer . |
java.lang.String |
asString()
Returns the value as
String . |
java.lang.String |
toString()
Returns the value as
String . |
asArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asRawValue, asStringValue, equals, getValueType, immutableValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, toJson, writeTo
byte[] asByteArray()
byte[]
.
This method copies the byte array.java.nio.ByteBuffer asByteBuffer()
ByteBuffer
.
Returned ByteBuffer is read-only. See also ByteBuffer.asReadOnlyBuffer()
.
This method doesn't copy the byte array as much as possible.java.lang.String asString()
String
.
This method throws an exception if the value includes invalid UTF-8 byte sequence.MessageStringCodingException
- If this value includes invalid UTF-8 byte sequence.java.lang.String toString()
String
.
This method replaces an invalid UTF-8 byte sequence with U+FFFD replacement character
.toString
in class java.lang.Object