Class PosFlags

java.lang.Object
org.jpos.iso.PosFlags
Direct Known Subclasses:
PosCapability, PosDataCode

public abstract class PosFlags extends Object
Base class for fixed-byte flag fields (e.g. POS data codes), exposing a shared setFlags(boolean, Flag...) helper that toggles bits within a packed byte buffer.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Single flag identified by its byte offset and bit-mask within getBytes().
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor; no instance state to initialise.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract byte[]
    Returns the underlying byte buffer holding the packed flags.
    protected void
    setFlags(boolean value, PosFlags.Flag... flags)
    Sets or unsets a set of flags according to value
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PosFlags

      protected PosFlags()
      Default constructor; no instance state to initialise.
  • Method Details

    • setFlags

      protected void setFlags(boolean value, PosFlags.Flag... flags)
      Sets or unsets a set of flags according to value
      Parameters:
      value - if true flags are set, else unset
      flags - flag set to set or unset
    • getBytes

      public abstract byte[] getBytes()
      Returns the underlying byte buffer holding the packed flags.
      Returns:
      live byte array (callers may modify it)
    • toString

      public String toString()
      Overrides:
      toString in class Object