Class IF_FBINARY.FullyConsumingPrefixer

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

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

    • encodeLength

      public void encodeLength(int length, byte[] bytes)
      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
    • decodeLength

      public int decodeLength(byte[] bytes, int offset)
      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
    • 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