Class AmexNumV2X<M>

java.lang.Object
cl.netswitch.iso.amex8583.AmexField<M,BigInteger>
cl.netswitch.iso.amex8583.AmexNumV2X<M>
Type Parameters:
M - the type of the AMEX message.

public class AmexNumV2X<M> extends AmexField<M,BigInteger>
Numeric Variable-Length (LL) of at most N EBCDIC-500 digits (19 ≤ N ≤ 99).
  • Constructor Details

    • AmexNumV2X

      public AmexNumV2X(int index, int maxlen, String name)
      Constructs a new AmexNumV2X instance.
      Parameters:
      index - the index of this field.
      maxlen - max number of elements of this field value.
      name - the name of this field.
      Throws:
      NullPointerException - if name is null.
      IllegalArgumentException - if an argument is invalid.
    • AmexNumV2X

      public AmexNumV2X(int index, int minlen, int maxlen, String name)
      Constructs a new AmexNumV2X instance.
      Parameters:
      index - the index of this field.
      minlen - min number of elements of this field value.
      maxlen - max number of elements of this field value.
      name - the name of this field.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
  • Method Details

    • decodeValue

      public BigInteger decodeValue(ByteBuffer buffer)
      Decodes the value of this field from the supplied byte buffer.
      Specified by:
      decodeValue in class AmexField<M,BigInteger>
      Parameters:
      buffer - the buffer containing the encoded field value.
      Returns:
      the value decoded from supplied byte buffer.
      Throws:
      NullPointerException - if buffer is null.
      AmexException - if contents of buffer is invalid.
    • encodeValue

      public void encodeValue(BigInteger value, cl.netswitch.lib.util.ByteArray barray)
      Encodes the value of this field into the supplied byte array.
      Specified by:
      encodeValue in class AmexField<M,BigInteger>
      Parameters:
      value - the value to be encoded into byte array.
      barray - the byte array containing encoded field values.
      Throws:
      NullPointerException - if an argument is null.
      AmexException - if value is invalid.