Class ISOBitMap
java.lang.Object
org.jpos.iso.ISOComponent
org.jpos.iso.ISOBitMap
- All Implemented Interfaces:
Cloneable
implements Leaf for Bitmap field
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe ISO field number.protected BitSetThe BitSet representing the bitmap. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(PrintStream p, String indent) dump this field to PrintStream.intReturns the field number this component occupies within its container.getKey()valid on Leafs only.getValue()valid on Leafs only.byte[]pack()not available on Leaf - always throw ISOExceptionvoidsetFieldNumber(int fieldNumber) changes this Component field number
Use with care, this method does not change any reference held by a Composite.voidSets the value of this component.intunpack(byte[] b) not available on Leaf - always throw ISOExceptionvoidunpack(InputStream in) not available on Leaf - always throw ISOExceptionMethods inherited from class ISOComponent
getBytes, getChildren, getComposite, getMaxField, pack, set, unsetModifier and TypeMethodDescriptionbyte[]getBytes()get Value as bytes (when possible)dummy behaviour - return empty mapIn order to interchange Composites and Leafs we use getComposite().inta Composite must override this functionvoidpack(OutputStream out) Packs this component and writes it toout.voidset(ISOComponent c) Set a field within this messagevoidunset(int fldno) Unset a field
-
Field Details
-
fieldNumber
The ISO field number. -
value
-
-
Constructor Details
-
ISOBitMap
Constructs a bitmap with the given field number.- Parameters:
n- - the FieldNumber
-
ISOBitMap
-
-
Method Details
-
setFieldNumber
changes this Component field number
Use with care, this method does not change any reference held by a Composite.- Specified by:
setFieldNumberin classISOComponent- Parameters:
fieldNumber- new field number
-
getFieldNumber
Description copied from class:ISOComponentReturns the field number this component occupies within its container.- Specified by:
getFieldNumberin classISOComponent- Returns:
- the field number
-
pack
not available on Leaf - always throw ISOException- Specified by:
packin classISOComponent- Returns:
- packed bytes
- Throws:
ISOException- on ISO processing error
-
unpack
not available on Leaf - always throw ISOException- Specified by:
unpackin classISOComponent- Parameters:
b- packed bytes- Returns:
- number of bytes consumed
- Throws:
ISOException- on ISO processing error
-
unpack
not available on Leaf - always throw ISOException- Specified by:
unpackin classISOComponent- Parameters:
in- source stream- Throws:
ISOException- on ISO processing error
-
getKey
Description copied from class:ISOComponentvalid on Leafs only. The value returned is used by ISOMsg as a key to this field.- Overrides:
getKeyin classISOComponent- Returns:
- Object representing this field number
-
getValue
Description copied from class:ISOComponentvalid on Leafs only.- Overrides:
getValuein classISOComponent- Returns:
- Object representing this field value
-
setValue
Description copied from class:ISOComponentSets the value of this component.- Specified by:
setValuein classISOComponent- Parameters:
obj- - Object representing this field value- Throws:
ISOException- on ISO processing error
-
dump
dump this field to PrintStream. The output is sorta XML, intended to be easily parsed.- Specified by:
dumpin classISOComponent- Parameters:
p- - print streamindent- - optional indent string
-