public abstract class ISOFieldPackager
extends java.lang.Object
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
Modifier and Type | Field and Description |
---|---|
protected boolean |
pad |
protected boolean |
trim |
Constructor and Description |
---|
ISOFieldPackager()
Default Constructor
|
ISOFieldPackager(int len,
java.lang.String description) |
Modifier and Type | Method and 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) |
public ISOFieldPackager()
public ISOFieldPackager(int len, java.lang.String description)
len
- - field Lendescription
- - detailspublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
public int getLength()
public void setLength(int len)
public void setPad(boolean pad)
public void setTrim(boolean trim)
public abstract int getMaxPackedLength()
public ISOComponent createComponent(int fieldNumber)
public abstract byte[] pack(ISOComponent c) throws ISOException
c
- - a componentISOException
public abstract int unpack(ISOComponent c, byte[] b, int offset) throws ISOException
c
- - the Component to unpackb
- - binary imageoffset
- - starting offset within the binary imageISOException
public void unpack(ISOComponent c, java.io.InputStream in) throws java.io.IOException, ISOException
c
- - the Component to unpackin
- - input streamISOException
java.io.IOException
public void pack(ISOComponent c, java.io.ObjectOutput out) throws java.io.IOException, ISOException
c
- - the Component to unpackout
- - output streamISOException
java.io.IOException
protected byte[] readBytes(java.io.InputStream in, int l) throws java.io.IOException
java.io.IOException