|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fudgemsg.FudgeFieldType<short[]>
org.fudgemsg.types.ShortArrayFieldType
public class ShortArrayFieldType
Type definition for arrays of 16-bit integers.
Field Summary | |
---|---|
static ShortArrayFieldType |
INSTANCE
Standard Fudge field type: array of 16-bit integers. |
Method Summary | |
---|---|
int |
getVariableSize(short[] value,
FudgeTaxonomy taxonomy)
Gets the number of bytes used to encode a value. |
short[] |
readValue(DataInput input,
int dataSize)
Reads a value of this type to the output. |
void |
writeValue(DataOutput output,
short[] value)
Writes a value of this type to the output. |
Methods inherited from class org.fudgemsg.FudgeFieldType |
---|
equals, getFixedSize, getJavaType, getTypeId, hashCode, isVariableSize, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ShortArrayFieldType INSTANCE
FudgeTypeDictionary.SHORT_ARRAY_TYPE_ID
.
Method Detail |
---|
public int getVariableSize(short[] value, FudgeTaxonomy taxonomy)
A variable width type must override this method.
A fixed width type will return the fixed size
.
getVariableSize
in class FudgeFieldType<short[]>
value
- the value to check, not used for fixed width typestaxonomy
- the taxonomy being used for the encoding, not used for fixed width types
public short[] readValue(DataInput input, int dataSize) throws IOException
This is intended for use by variable width types and must read the given value. The implementation must read exactly the number of bytes passed into the method.
readValue
in class FudgeFieldType<short[]>
input
- the input source to read the value from, not nulldataSize
- the number of bytes of data to read
IOException
- if an error occurs, which must be wrapped by the callerpublic void writeValue(DataOutput output, short[] value) throws IOException
This is intended for use by variable width types and must write the given value.
The implementation must write exactly the number of bytes returned by the
size calculation
.
writeValue
in class FudgeFieldType<short[]>
output
- the output target to write the value to, not nullvalue
- the value to write
IOException
- if an error occurs, which must be wrapped by the caller
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |