Class VipStrVL<M>

java.lang.Object
cl.netswitch.iso.vip8583.VipField<M,String>
cl.netswitch.iso.vip8583.VipStrVL<M>
Type Parameters:
M - the type of the VIP message.

public class VipStrVL<M> extends VipField<M,String>
String Variable-Length of at most N EBCDIC-037 characters (1 ≤ N ≤ 255).
  • Constructor Details

    • VipStrVL

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

      public VipStrVL(int index, int minlen, int maxlen, boolean rtrim, String name)
      Constructs a new VipStrVL instance.
      Parameters:
      index - the index of this field.
      minlen - min number of characters of this field value.
      maxlen - max number of characters of this field value.
      rtrim - if true input strings are right-trimmed.
      name - the name of this field.
      Throws:
      NullPointerException - if name 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 VipField<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.
      VipException - if contents of buffer is invalid.
    • encodeValue

      public void encodeValue(String value, cl.netswitch.lib.util.ByteArray barray)
      Encodes the value of this field into the supplied byte array.
      Specified by:
      encodeValue in class VipField<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.
      VipException - if value is invalid.