Class ISOFieldPackager
java.lang.Object
org.jpos.iso.ISOFieldPackager
- Direct Known Subclasses:
BinaryHexTaggedSequencePackager.TagPackager, IF_ECHAR, IF_FSTBINARY, IF_FSTCHAR, IF_NOP, IF_TBASE, IF_UNUSED, IFA_LLABINARY, IFA_LLBNUM, IFA_LLLABINARY, IFB_AMOUNT, IFB_LLHFBINARY, IFEB_LLLNUM, IFEB_LLNUM, IFELPE_LLLCHAR, IFEP_LLCHAR, IFEP_LLLCHAR, IFIPM_LLLCHAR, ISOAmountFieldPackager, ISOBinaryFieldPackager, ISOBitMapPackager, ISOFilledStringFieldPackager, ISOFormattableBinaryFieldPackager, ISOFormattableStringFieldPackager, ISOMsgFieldPackager, ISOStringFieldPackager, ISOTagStringFieldPackager, TaggedFieldPackagerBase
base class for the various IF*.java Field Packagers
Implements "FlyWeight" pattern
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateComponent(int fieldNumber) intabstract intabstract byte[]pack(ISOComponent c) voidpack(ISOComponent c, ObjectOutput out) protected byte[]readBytes(InputStream in, int l) voidsetDescription(String description) voidsetLength(int len) voidsetPad(boolean pad) voidsetTrim(boolean trim) abstract intunpack(ISOComponent c, byte[] b, int offset) voidunpack(ISOComponent c, InputStream in)
-
Field Details
-
pad
-
trim
-
-
Constructor Details
-
ISOFieldPackager
public ISOFieldPackager()Default Constructor -
ISOFieldPackager
- Parameters:
len- - field Lendescription- - details
-
-
Method Details
-
getDescription
-
setDescription
-
getLength
-
setLength
-
setPad
-
setTrim
-
getMaxPackedLength
-
createComponent
-
pack
- Parameters:
c- - a component- Returns:
- packed component
- Throws:
ISOException
-
unpack
- Parameters:
c- - the Component to unpackb- - binary imageoffset- - starting offset within the binary image- Returns:
- consumed bytes
- Throws:
ISOException
-
unpack
- Parameters:
c- - the Component to unpackin- - input stream- Throws:
ISOExceptionIOException
-
pack
- Parameters:
c- - the Component to unpackout- - output stream- Throws:
ISOExceptionIOException
-
readBytes
- Throws:
IOException
-