public final class TeraValue extends Object implements Value
This class is a wrapper for the value part of the integer number.
| Modifier and Type | Field and Description |
|---|---|
static int |
VALUE_SIZE
The size of the value in bytes.
|
| Constructor and Description |
|---|
TeraValue()
Default constructor required for serialization/deserialization.
|
TeraValue(byte[] srcBuf,
int offset)
Constructs a new value object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyToBuffer(byte[] buf)
Copies the value to the given byte buffer.
|
void |
read(DataInput in) |
void |
setValue(byte[] data,
int offset)
Sets the value of this value object.
|
String |
toString() |
void |
write(DataOutput out) |
public static final int VALUE_SIZE
public TeraValue(byte[] srcBuf,
int offset)
srcBuf - The source buffer to read the value from.offset - The offset in the byte array where the value subsequence starts.public TeraValue()
public void setValue(byte[] data,
int offset)
data - The source buffer to read the value from.offset - The offset in the byte array where the value subsequence starts.public void write(DataOutput out) throws IOException
write in interface IOReadableWritableIOExceptionpublic void read(DataInput in) throws IOException
read in interface IOReadableWritableIOExceptionpublic void copyToBuffer(byte[] buf)
buf - the buffer to copy the value toCopyright © 2013. All rights reserved.