Class AmexStrFL<M>

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

public class AmexStrFL<M> extends AmexField<M,String>
String Fixed-Length Left-Justified of N EBCDIC-500 characters (1 ≤ N).
  • Constructor Details

    • AmexStrFL

      public AmexStrFL(int index, int length, String name)
      Constructs a new AmexStrFL instance.
      Parameters:
      index - the index of this field.
      length - fixed length of this field value.
      name - the name of this field.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
    • AmexStrFL

      public AmexStrFL(int index, int length, boolean rtrim, String name)
      Constructs a new AmexStrFL instance.
      Parameters:
      index - the index of this field.
      length - fixed length of this field value.
      rtrim - if true input strings are right-trimmed.
      name - the name of this field.
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if an argument is invalid.
  • Method Details

    • decodeValue

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