Class IsoNumV2L<M>

java.lang.Object
cl.netswitch.iso.iso8583.IsoField<M,Long>
cl.netswitch.iso.iso8583.IsoNumV2L<M>
Type Parameters:
M - the type of the ISO message.

public class IsoNumV2L<M> extends IsoField<M,Long>
Numeric Variable-Length (LL) of at most N ASCII digits (10 ≤ N ≤ 18).
  • Constructor Details

    • IsoNumV2L

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

      public IsoNumV2L(int index, int minlen, int maxlen, String name)
      Constructs a new IsoNumV2L 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 IsoField<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.
      IsoException - 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 IsoField<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.
      IsoException - if value is invalid.