public class UnsignedIntegerEncodingEncoder extends Object
A multi-dimensional array of unsigned integers (UInt) encodes each Element as a BER-OID. The multi-dimensional UInt array serializes into a single dimensional linear array. Each value of the serialized array is BER-OID encoded and combined into a single block of BER-OID data.
Because each value is a variable length Element,extracting individual Elements from the serialized array is not possible until decoding the whole array back into UInt values.
Constructor and Description |
---|
UnsignedIntegerEncodingEncoder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
encode(long[] data)
Encode an (unsigned) integer array to a Multi-Dimensional Array Pack using Unsigned Integer
Encoding.
|
byte[] |
encode(long[][] data)
Encode a two dimensional (unsigned) integer array to a Multi-Dimensional Array Pack using
Unsigned Integer Encoding.
|
public UnsignedIntegerEncodingEncoder()
MDAP Unsigned Integer encoding does not require parameters.
public byte[] encode(long[][] data) throws KlvParseException
data
- the array of arrays of (boolean
) values.KlvParseException
- if the encoding fails, such as for invalid array dimensions.public byte[] encode(long[] data) throws KlvParseException
data
- the array of arrays of (boolean
) values.KlvParseException
- if the encoding fails, such as for invalid array dimensions.Copyright © 2022 West Ridge Systems. All rights reserved.