Interface ISOHeader

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
BASE1Header, BaseHeader

public interface ISOHeader extends Cloneable, Serializable
Represents the optional header portion of an ISO-8583 message frame.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a clone of this ISOHeader.
    Returns the destination address in this ISOHeader.
    int
    Returns the number of bytes in this ISOHeader when packed.
    Returns the source address in this ISOHeader.
    byte[]
    Packs this header into a byte array.
    void
    Sets the destination address in this ISOHeader.
    void
    Sets the source address in this ISOHeader.
    void
    Swaps the source and destination addresses in this ISOHeader (if they exist).
    int
    unpack(byte[] b)
    Unpacks the header from a raw byte array.
  • Method Details

    • pack

      byte[] pack()
      Packs this header into a byte array.
      Returns:
      this header serialised as a byte array
    • unpack

      int unpack(byte[] b)
      Unpacks the header from a raw byte array.
      Parameters:
      b - raw bytes to parse
      Returns:
      the number of bytes consumed
    • setDestination

      Sets the destination address in this ISOHeader.
      Parameters:
      dst - the destination address
    • getDestination

      Returns the destination address in this ISOHeader.
      Returns:
      the destination address, or null if not set
    • setSource

      void setSource(String src)
      Sets the source address in this ISOHeader.
      Parameters:
      src - the source address
    • getSource

      Returns the source address in this ISOHeader.
      Returns:
      the source address, or null if not set
    • getLength

      int getLength()
      Returns the number of bytes in this ISOHeader when packed.
      Returns:
      header length in bytes
    • swapDirection

      Swaps the source and destination addresses in this ISOHeader (if they exist).
    • clone

      Returns a clone of this ISOHeader.
      Returns:
      cloned ISOHeader instance