Class IsoDecFL<M>

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

public class IsoDecFL<M> extends IsoField<M,BigDecimal>
Decimal Fixed-Length Right-Justified of N digits (1 ≤ N) and Scale S (0 ≤ S < N).
  • Constructor Details

    • IsoDecFL

      public IsoDecFL(int index, int length, String name)
      Constructs a new IsoDecFL instance with scale 0.
      Parameters:
      index - the index of this field.
      length - the 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.
    • IsoDecFL

      public IsoDecFL(int index, int length, int scale, String name)
      Constructs a new IsoDecFL instance.
      Parameters:
      index - the index of this field.
      length - the number of elements of this field value.
      scale - the number of digits in the fractional part.
      name - the name of this field.
      Throws:
      NullPointerException - if name is null.
      IllegalArgumentException - if an argument is invalid.
  • Method Details

    • decodeValue

      public BigDecimal decodeValue(ByteBuffer buffer)
      Decodes the value of this field from the supplied byte buffer.
      Specified by:
      decodeValue in class IsoField<M,BigDecimal>
      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.
    • encodeValue

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