- All Known Subinterfaces:
HLAASCIIchar,HLAASCIIstring,HLAboolean,HLAbyte,HLAfixedArray<T>,HLAfixedRecord,HLAfloat32BE,HLAfloat32LE,HLAfloat64BE,HLAfloat64LE,HLAinteger16BE,HLAinteger16LE,HLAinteger32BE,HLAinteger32LE,HLAinteger64BE,HLAinteger64LE,HLAoctet,HLAoctetPairBE,HLAoctetPairLE,HLAopaqueData,HLAunicodeChar,HLAunicodeString,HLAvariableArray<T>,HLAvariantRecord<T>
public interface DataElement
Interface provided by all HLA data elements.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(byte[] bytes) Decodes this element from the byte array.voiddecode(ByteWrapper byteWrapper) Decodes this element from the ByteWrapper.voidencode(ByteWrapper byteWrapper) Encodes this element into the specified ByteWrapper.intReturns the size in bytes of this element's encoding.intReturns the octet boundary of this element.byte[]Returns a byte array with this element encoded.
-
Method Details
-
getOctetBoundary
int getOctetBoundary()Returns the octet boundary of this element.- Returns:
- the octet boundary of this element
-
encode
Encodes this element into the specified ByteWrapper.- Parameters:
byteWrapper- destination for the encoded element- Throws:
EncoderException- if the element can not be encoded
-
getEncodedLength
int getEncodedLength()Returns the size in bytes of this element's encoding.- Returns:
- the size in bytes of this element's encoding
-
toByteArray
Returns a byte array with this element encoded.- Returns:
- byte array with encoded element
- Throws:
EncoderException- if the element can not be encoded
-
decode
Decodes this element from the ByteWrapper.- Parameters:
byteWrapper- source for the decoding of this element- Throws:
DecoderException- if the element can not be decoded
-
decode
Decodes this element from the byte array.- Parameters:
bytes- source for the decoding of this element- Throws:
DecoderException- if the element can not be decoded
-