Package org.jpos.iso
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
public abstract class ISOFieldPackager extends java.lang.Object
base class for the various IF*.java Field Packagers Implements "FlyWeight" pattern- See Also:
IFA_AMOUNT
,IFA_BINARY
,IFA_BITMAP
,IFA_FLLCHAR
,IFA_FLLNUM
,IFA_LLCHAR
,IFA_LLLBINARY
,IFA_LLLCHAR
,IFA_LLLNUM
,IFA_LLNUM
,IFA_NUMERIC
,IFB_AMOUNT
,IFB_BINARY
,IFB_BITMAP
,IFB_LLBINARY
,IFB_LLCHAR
,IFB_LLHBINARY
,IFB_LLHCHAR
,IFB_LLHECHAR
,IFB_LLHNUM
,IFB_LLLBINARY
,IFB_LLLCHAR
,IFB_LLLNUM
,IFB_LLNUM
,IFB_NUMERIC
,IF_CHAR
-
-
Constructor Summary
Constructors Constructor Description ISOFieldPackager()
Default ConstructorISOFieldPackager(int len, java.lang.String description)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ISOComponent
createComponent(int fieldNumber)
java.lang.String
getDescription()
int
getLength()
abstract int
getMaxPackedLength()
abstract byte[]
pack(ISOComponent c)
void
pack(ISOComponent c, java.io.ObjectOutput out)
protected byte[]
readBytes(java.io.InputStream in, int l)
void
setDescription(java.lang.String description)
void
setLength(int len)
void
setPad(boolean pad)
void
setTrim(boolean trim)
abstract int
unpack(ISOComponent c, byte[] b, int offset)
void
unpack(ISOComponent c, java.io.InputStream in)
-
-
-
Constructor Detail
-
ISOFieldPackager
public ISOFieldPackager()
Default Constructor
-
ISOFieldPackager
public ISOFieldPackager(int len, java.lang.String description)
- Parameters:
len
- - field Lendescription
- - details
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
-
setDescription
public void setDescription(java.lang.String description)
-
getLength
public int getLength()
-
setLength
public void setLength(int len)
-
setPad
public void setPad(boolean pad)
-
setTrim
public void setTrim(boolean trim)
-
getMaxPackedLength
public abstract int getMaxPackedLength()
-
createComponent
public ISOComponent createComponent(int fieldNumber)
-
pack
public abstract byte[] pack(ISOComponent c) throws ISOException
- Parameters:
c
- - a component- Returns:
- packed component
- Throws:
ISOException
-
unpack
public abstract int unpack(ISOComponent c, byte[] b, int offset) throws ISOException
- Parameters:
c
- - the Component to unpackb
- - binary imageoffset
- - starting offset within the binary image- Returns:
- consumed bytes
- Throws:
ISOException
-
unpack
public void unpack(ISOComponent c, java.io.InputStream in) throws java.io.IOException, ISOException
- Parameters:
c
- - the Component to unpackin
- - input stream- Throws:
ISOException
java.io.IOException
-
pack
public void pack(ISOComponent c, java.io.ObjectOutput out) throws java.io.IOException, ISOException
- Parameters:
c
- - the Component to unpackout
- - output stream- Throws:
ISOException
java.io.IOException
-
readBytes
protected byte[] readBytes(java.io.InputStream in, int l) throws java.io.IOException
- Throws:
java.io.IOException
-
-