private abstract class Variable.AbstractRawValueAccessor extends Variable.AbstractValueAccessor implements RawValue
| Modifier | Constructor and Description |
|---|---|
private |
AbstractRawValueAccessor() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asByteArray()
Returns the value as
byte[]. |
java.nio.ByteBuffer |
asByteBuffer()
Returns the value as
ByteBuffer. |
RawValue |
asRawValue()
Returns the value as
RawValue. |
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, asStringValue, asTimestampValue, equals, hashCode, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, isTimestampValue, toJsonclone, finalize, getClass, notify, notifyAll, wait, wait, waitasArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asStringValue, asTimestampValue, equals, getValueType, immutableValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, isTimestampValue, toJson, writeTopublic RawValue asRawValue()
ValueRawValue. Otherwise throws MessageTypeCastException.
Note that you can't use instanceof or cast ((RawValue) thisValue) to check type of a value because type of a mutable value is variable.asRawValue in interface ValueasRawValue in class Variable.AbstractValueAccessorpublic byte[] asByteArray()
RawValuebyte[].
This method copies the byte array.asByteArray in interface RawValuepublic java.nio.ByteBuffer asByteBuffer()
RawValueByteBuffer.
Returned ByteBuffer is read-only. See also ByteBuffer.asReadOnlyBuffer().
This method doesn't copy the byte array as much as possible.asByteBuffer in interface RawValuepublic java.lang.String asString()
RawValueString.
This method throws an exception if the value includes invalid UTF-8 byte sequence.public java.lang.String toString()
RawValueString.
This method replaces an invalid UTF-8 byte sequence with U+FFFD replacement character.toString in interface RawValuetoString in class Variable.AbstractValueAccessor