public class Value extends Object implements oracle.kv.impl.util.FastExternalizable
Modifier and Type | Class and Description |
---|---|
static class |
Value.Format
Identifies the format of a value.
|
Modifier and Type | Field and Description |
---|---|
static Value |
EMPTY_VALUE
An instance that represents an empty value for key-only records.
|
Modifier and Type | Method and Description |
---|---|
static Value |
createValue(byte[] val)
Creates a Value from a value byte array.
|
boolean |
equals(Object other) |
static Value |
fromByteArray(byte[] bytes)
Deserializes the given bytes that were returned earlier by
toByteArray() and returns the resulting Value. |
Value.Format |
getFormat()
Returns the value's format.
|
byte[] |
getValue()
Returns the value byte array.
|
int |
hashCode() |
byte[] |
toByteArray()
Returns this Value as a serialized byte array, such that
fromByteArray(byte[]) may be used to reconstitute the Value. |
String |
toString() |
public static final Value EMPTY_VALUE
public byte[] toByteArray()
fromByteArray(byte[])
may be used to reconstitute the Value.
Note that this method does not always return an array equal to the
getValue()
array. The serialized representation of a Value may
contain an extra byte identifying the format.
public static Value fromByteArray(byte[] bytes)
toByteArray()
and returns the resulting Value.
Note that an array equal to the getValue()
array may not be
passed to this method. To create a Value from only the value array,
call createValue(byte[])
instead.
public static Value createValue(byte[] val)
Value.Format.NONE
. This method
may not be used to create Avro values; for that, use an AvroBinding
instead.public byte[] getValue()
public Value.Format getFormat()
Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved.