Package org.jpos.iso

Class ISOBinaryField

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int fieldNumber  
      protected byte[] value  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump​(java.io.PrintStream p, java.lang.String indent)
      dump this field to PrintStream.
      byte[] getBytes()
      get Value as bytes (when possible)
      int getFieldNumber()  
      java.lang.Object getKey()
      valid on Leafs only.
      java.lang.Object getValue()
      valid on Leafs only.
      byte[] pack()
      not available on Leaf - always throw ISOException
      void readExternal​(java.io.ObjectInput in)  
      void setFieldNumber​(int fieldNumber)
      changes this Component field number
      Use with care, this method does not change any reference held by a Composite.
      void setValue​(java.lang.Object obj)  
      java.lang.String toString()  
      int unpack​(byte[] b)
      not available on Leaf - always throw ISOException
      void unpack​(java.io.InputStream in)
      not available on Leaf - always throw ISOException
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

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

      • ISOBinaryField

        public ISOBinaryField()
        No args constructor (required by Externalizable support on ISOMsg)
      • ISOBinaryField

        public ISOBinaryField​(int n)
        Parameters:
        n - - the FieldNumber
      • ISOBinaryField

        public ISOBinaryField​(int n,
                              byte[] v)
        Parameters:
        n - - fieldNumber
        v - - fieldValue
      • ISOBinaryField

        public ISOBinaryField​(int n,
                              byte[] v,
                              int offset,
                              int len)
        Parameters:
        n - - fieldNumber
        v - - fieldValue
        offset - - starting offset
        len - - field length
    • Method Detail

      • setFieldNumber

        public void setFieldNumber​(int fieldNumber)
        changes this Component field number
        Use with care, this method does not change any reference held by a Composite.
        Specified by:
        setFieldNumber in class ISOComponent
        Parameters:
        fieldNumber - new field number
      • getKey

        public java.lang.Object getKey()
        Description copied from class: ISOComponent
        valid on Leafs only. The value returned is used by ISOMsg as a key to this field.
        Overrides:
        getKey in class ISOComponent
        Returns:
        Object representing this field number
      • getValue

        public java.lang.Object getValue()
        Description copied from class: ISOComponent
        valid on Leafs only.
        Overrides:
        getValue in class ISOComponent
        Returns:
        Object representing this field value
      • getBytes

        public byte[] getBytes()
        Description copied from class: ISOComponent
        get Value as bytes (when possible)
        Overrides:
        getBytes in class ISOComponent
        Returns:
        byte[] representing this field
      • dump

        public void dump​(java.io.PrintStream p,
                         java.lang.String indent)
        dump this field to PrintStream. The output is sorta XML, intended to be easily parsed.
        Specified by:
        dump in class ISOComponent
        Parameters:
        p - - print stream
        indent - - optional indent string
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException