|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlListElement
com.neeve.sto.StoField
com.neeve.sto.StoShortField
public final class StoShortField
An STO field that holds a short value.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.neeve.sto.StoField |
---|
StoField.Type |
Field Summary |
---|
Fields inherited from class com.neeve.util.UtlListElement |
---|
count, head, next, prev |
Method Summary | |
---|---|
static StoShortField |
create(ByteBuffer buffer,
int bufferOffset)
Create an STO short field from its serialized form. |
static StoShortField |
create(String name)
Create an STO short field. |
static short |
get(ByteBuffer buffer,
int offset)
Deserialize a short value. |
static int |
getSerializedLength(ByteBuffer buffer,
int offset)
Get the length of a serialized short value. |
short |
getValue()
Get the field value |
boolean |
isVariableLength()
Implementation of StoField.isVariableLength() |
static void |
put(ByteBuffer buffer,
int offset,
short val)
Serialize a short value. |
void |
reset()
Implementation of StoField.reset() |
void |
setValue(short val)
Set the field value |
Methods inherited from class com.neeve.sto.StoField |
---|
changeBackingBuffer, clearBackingBuffer, clone, contentsEquals, getBackingBuffer, getHeader, getLength, getName, getSerializedLength, getType, getVersion, isNamed, setBackingBuffer, shiftForHeader, sync, toString |
Methods inherited from class com.neeve.util.UtlListElement |
---|
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final boolean isVariableLength()
StoField.isVariableLength()
isVariableLength
in class StoField
public static StoShortField create(String name)
name
- The name of the field. A value of null will cause an unnamed
field to be created.public static StoShortField create(ByteBuffer buffer, int bufferOffset)
buffer
- The buffer containing the serialized field.bufferOffset
- The offset into the buffer where the serialized
form of the field begins.public static int getSerializedLength(ByteBuffer buffer, int offset)
buffer
- The buffer containing the serialized value.offset
- The offset into the buffer where the value is serialized.
This method leaves the buffer markers intact.
public static void put(ByteBuffer buffer, int offset, short val)
buffer
- The buffer in which to serialize the value.offset
- The offset into the buffer at which point to serialize
the value.
This method leaves the buffer markers intact.
public static short get(ByteBuffer buffer, int offset)
buffer
- The buffer from which to deserialize the value.offset
- The offset into the buffer from which to deserialize the
value.
This method leaves the buffer markers intact.
public final void reset()
StoField.reset()
reset
in class StoField
public final void setValue(short val)
val
- The value to set.public final short getValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |