@NotStorableClass public class ShortConverter extends AbstractConverter
Modifier and Type | Field and Description |
---|---|
static int |
BYTE_SIZE
1 byte for flags and 2 bytes for 16 bits data
|
helperBinaryConversion, objectFromBinary, offsetFromBinary, valueDefinedFromBinary
Constructor and Description |
---|
ShortConverter() |
Modifier and Type | Method and Description |
---|---|
int |
byteSize() |
void |
fromBinary(byte[] binary,
int offset)
convert binary to object
can return already existing object for same state, example of Integer.valueOf() |
int |
toBinary(byte[] binary,
int offset,
boolean valueDefined,
Object object)
convert object value to binary
|
assertBound, initialize, referencedObject
public static final int BYTE_SIZE
public int byteSize()
public int toBinary(byte[] binary, int offset, boolean valueDefined, Object object) throws BinaryConverterException
IBinaryConverter
binary
- where put the resultoffset
- offset on binary array to write the resultvalueDefined
- true if value definedobject
- the object from which take the valueBinaryConverterException
public void fromBinary(byte[] binary, int offset) throws BinaryConverterException
IBinaryConverter
binary
- the binary valueoffset
- offset of the binary value in binary arrayBinaryConverterException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.