Class IF_FCHAR.FullyConsumingPrefixer

java.lang.Object
org.jpos.tlv.packager.IF_FCHAR.FullyConsumingPrefixer
All Implemented Interfaces:
Prefixer
Enclosing class:
IF_FCHAR

public static class IF_FCHAR.FullyConsumingPrefixer extends Object implements Prefixer
A Prefixer that consumes all available characters (no explicit length).
  • Method Details

    • encodeLength

      public void encodeLength(int length, byte[] bytes) throws ISOException
      Description copied from interface: Prefixer
      Encodes the field length into the byte array.
      Specified by:
      encodeLength in interface Prefixer
      Parameters:
      length - the field length to encode
      bytes - the byte array to write the length prefix into
      Throws:
      ISOException - if the length exceeds the prefix capacity
    • decodeLength

      public int decodeLength(byte[] bytes, int offset) throws ISOException
      Description copied from interface: Prefixer
      Decodes an encoded length from the byte array.
      Specified by:
      decodeLength in interface Prefixer
      Parameters:
      bytes - the byte array containing the length prefix
      offset - the offset in b where the prefix starts
      Returns:
      the length in chars of the field data to follow this prefix
      Throws:
      ISOException - if the prefix cannot be decoded
    • getPackedLength

      public int getPackedLength()
      Description copied from interface: Prefixer
      Returns the number of bytes taken up by the length encoding.
      Specified by:
      getPackedLength in interface Prefixer
      Returns:
      the number of bytes used by the length encoding