Class ISOBitMapPackager
java.lang.Object
org.jpos.iso.ISOFieldPackager
org.jpos.iso.ISOBitMapPackager
- Direct Known Subclasses:
Base1_BITMAP126, IFA_BITMAP, IFB_BITMAP, IFE_BITMAP, X92_BITMAP
IF*_BITMAP classes extends this class instead of ISOFieldPackager
so packagers can check if field-1 ISOFieldPackager is an instance
of an ISOBitMapPackager and handle differences between ANSI X9.2
and ISO-8583 packaging schemes.
- See Also:
-
Field Summary
Fields inherited from class ISOFieldPackager
pad, trim -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ISOBitMapPackager(int len, String description) Constructs a bitmap packager with the given length and description. -
Method Summary
Modifier and TypeMethodDescriptioncreateComponent(int fieldNumber) Creates anISOComponentinstance appropriate for this packager.Methods inherited from class ISOFieldPackager
getDescription, getLength, getMaxPackedLength, pack, pack, readBytes, setDescription, setLength, setPad, setTrim, unpack, unpackModifier and TypeMethodDescriptionReturns the field description.intReturns the maximum field length.abstract intReturns the maximum number of bytes this packager can produce.abstract byte[]pack(ISOComponent c) Packs the given component into a byte array.voidpack(ISOComponent c, ObjectOutput out) Packs the component to an ObjectOutput stream.protected byte[]readBytes(InputStream in, int l) Reads exactlylbytes from the input stream.voidsetDescription(String description) Sets the field description.voidsetLength(int len) Sets the maximum field length.voidsetPad(boolean pad) Enables or disables padding for this field.voidsetTrim(boolean trim) Enables or disables trimming for this field.abstract intunpack(ISOComponent c, byte[] b, int offset) Unpacks a field from the binary image into the given component.voidunpack(ISOComponent c, InputStream in) Unpacks a field from an input stream into the given component.
-
Constructor Details
-
ISOBitMapPackager
public ISOBitMapPackager()Default constructor. -
ISOBitMapPackager
Constructs a bitmap packager with the given length and description.- Parameters:
len- field lengthdescription- field description
-
-
Method Details
-
createComponent
Description copied from class:ISOFieldPackagerCreates anISOComponentinstance appropriate for this packager.- Overrides:
createComponentin classISOFieldPackager- Parameters:
fieldNumber- the field number to assign to the new component- Returns:
- a new ISOComponent
-