public class NaturalFormatEncoder extends Object
This encodes the provided array as a sequence of primitive values.
Constructor and Description |
---|
NaturalFormatEncoder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
encode(boolean[][] data)
Encode a two dimensional Boolean array to a Multi-Dimensional Array Pack using Natural Format
Encoding.
|
byte[] |
encode(double[] data)
Encode a two dimensional real array to a Multi-Dimensional Array Pack using Natural Format
Encoding.
|
byte[] |
encode(long[] data)
Encode a one dimensional (signed) integer array to a Multi-Dimensional Array Pack using
Natural Format Encoding.
|
byte[] |
encode(long[][] data)
Encode a two dimensional (signed) integer array to a Multi-Dimensional Array Pack using
Natural Format Encoding.
|
byte[] |
encodeUnsigned(long[] data)
Encode a one dimensional unsigned integer array to a Multi-Dimensional Array Pack using
Natural Format Encoding.
|
byte[] |
encodeUnsigned(long[][] data)
Encode a two dimensional unsigned integer array to a Multi-Dimensional Array Pack using
Natural Format Encoding.
|
public NaturalFormatEncoder()
MDAP Natural Format encoding does not require parameters.
public byte[] encode(double[] data) throws KlvParseException
data
- the array of arrays of (double
) values.KlvParseException
- if the encoding fails, such as for invalid array dimensions.public byte[] encode(long[] data) throws KlvParseException
data
- the array of (long
) 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 (long
) values.KlvParseException
- if the encoding fails, such as for invalid array dimensions.public byte[] encodeUnsigned(long[] data) throws KlvParseException
data
- the arrays of (long
) values.KlvParseException
- if the encoding fails, such as for invalid array dimensions.public byte[] encodeUnsigned(long[][] data) throws KlvParseException
data
- the array of arrays of (long
) values.KlvParseException
- if the encoding fails, such as for invalid array dimensions.public byte[] encode(boolean[][] data) throws KlvParseException
This serialises each value into a byte array.
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.