Class VariableDatum
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected VariableRecordTypeType of variable datum to be transmitted. 32 bit enumeration defined in EBV uid 66protected IntegerLength, IN BITS, of the variable datum.protected byte[]This field shall specify the value for a particular Variable Datum ID. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsImpl(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectintReturns size of this serialized (marshalled) object in bytesGetter forvariableDatumIDintGetter forvariableDatumLengthbyte[]Getter forvariableDatumValueinthashCode()voidmarshal(DataOutputStream dos) Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setVariableDatumID(VariableRecordType pVariableDatumID) Setter forvariableDatumIDsetVariableDatumLengthInBits(int bitLength) Setter forvariableDatumLengthsetVariableDatumLengthInBytes(int byteLength) Setter forvariableDatumLengthsetVariableDatumValue(byte[] pVariableDatumValue) Setter forvariableDatumValuetoString()intunmarshal(DataInputStream dis) Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.
-
Field Details
-
variableDatumID
Type of variable datum to be transmitted. 32 bit enumeration defined in EBV uid 66 -
variableDatumLength
Length, IN BITS, of the variable datum. -
variableDatumValue
protected byte[] variableDatumValueThis field shall specify the value for a particular Variable Datum ID. The field format shall depend on the type of datum as specified by the Variable Datum ID. Variable datums can be any number of bits long.
-
-
Constructor Details
-
VariableDatum
public VariableDatum()Constructor
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Returns:
- serialized size in bytes
- See Also:
-
setVariableDatumID
Setter forvariableDatumID- Parameters:
pVariableDatumID- of interest- Returns:
- same object to permit progressive setters
-
getVariableDatumID
-
setVariableDatumLengthInBits
Setter forvariableDatumLengthThis value is the size IN BITS of the
variableDatumValuefield. Since that field is a byte array, its size must be large enough to contain the specified number of bits. IfvariableDatumValueis NOT set and this pdu is issued (marshaled), the value used when marshaling this field will be the size of the byte array times 8.- Parameters:
bitLength- number of bits for this field- Returns:
- same object to permit progressive setters
-
setVariableDatumLengthInBytes
Setter forvariableDatumLengthThis value is the size in bytes of the
variableDatumValuefield. Since that field is a byte array, its size must be large enough to contain the value specified here. IfvariableDatumValueis NOT set and this pdu is issued (marshaled), the value used when marshaling this field will be the size of the byte array times 8.- Parameters:
byteLength- number of bytes for this field- Returns:
- same object to permit progressive setters
-
getVariableDatumLength
-
setVariableDatumValue
Setter forvariableDatumValueThis is described in the specification as a stream of bits, but is implemented in Java as a byte array. The size of the byte array reflects the value of
variableDatumLengthrounded to the next highest byte boundary. IfvariableDatumLengthis not set when the Pdu is sent, the receiver will read a bit length equal to the size of the byte array times 8.- Parameters:
pVariableDatumValue- of interest- Returns:
- same object to permit progressive setters
-
getVariableDatumValue
-
marshal
Serializes an object to a DataOutputStream.- Parameters:
dos- The DataOutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Parameters:
dis- DataInputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception- if something goes wrong- See Also:
-
marshal
Packs an object into the ByteBuffer.- Parameters:
byteBuffer- The ByteBuffer at the position to begin writing- Throws:
BufferOverflowException- if buff is too smallReadOnlyBufferException- if buff is read onlyException- ByteBuffer-generated exception- See Also:
-
unmarshal
Unpacks a Pdu from the underlying data.- Parameters:
byteBuffer- The ByteBuffer at the position to begin reading- Returns:
- marshalled serialized size in bytes
- Throws:
BufferUnderflowException- if buff is too smallException- ByteBuffer-generated exception- See Also:
-
equals
-
hashCode
-
equalsImpl
Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-