Class NullPrefixer

java.lang.Object
org.jpos.iso.NullPrefixer
All Implemented Interfaces:
Prefixer

public class NullPrefixer extends Object implements Prefixer
AsciiPrefixer constructs a prefix for ASCII messages.
  • Field Details

  • Method Details

    • encodeLength

      public void encodeLength(int length, byte[] b)
      Description copied from interface: Prefixer
      Fills a byte array with the field length data in raw form.
      Specified by:
      encodeLength in interface Prefixer
      Parameters:
      length - The length to be encoded.
      b - The byte array to fill with the encoded length.
    • decodeLength

      public int decodeLength(byte[] b, int offset)
      Returns -1 meaning there is no length field.
      Specified by:
      decodeLength in interface Prefixer
      Parameters:
      b - The byte array to scan for the length.
      offset - The offset to start scanning from.
      Returns:
      The length in chars of the field data to follow this LengthPrefix.
    • 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