Class AmexNumV2L<M>

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

public class AmexNumV2L<M> extends AmexField<M,Long>
Numeric Variable-Length (LL) of at most N EBCDIC-500 digits (10 ≤ N ≤ 18).
  • Constructor Details

    • AmexNumV2L

      public AmexNumV2L(int index, int maxlen, String name)
      Constructs a new AmexNumV2L 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.
    • AmexNumV2L

      public AmexNumV2L(int index, int minlen, int maxlen, String name)
      Constructs a new AmexNumV2L 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 Long decodeValue(ByteBuffer buffer)
      Decodes the value of this field from the supplied byte buffer.
      Specified by:
      decodeValue in class AmexField<M,Long>
      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.
      BufferUnderflowException - if buffer is missing bytes.
    • encodeValue

      public void encodeValue(Long value, ByteArray barray)
      Encodes the value of this field into the supplied byte array.
      Specified by:
      encodeValue in class AmexField<M,Long>
      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.