public abstract class ISOBasePackager extends java.lang.Object implements ISOPackager, LogSource
Modifier and Type | Field and Description |
---|---|
protected ISOFieldPackager[] |
fld |
protected int |
headerLength |
protected boolean |
logFieldName |
protected Logger |
logger |
protected java.lang.String |
realm |
protected int |
thirdBitmapField |
Constructor and Description |
---|
ISOBasePackager() |
Modifier and Type | Method and Description |
---|---|
ISOMsg |
createISOMsg() |
protected boolean |
emitBitMap() |
protected static void |
fieldUnpackLogger(LogEvent evt,
int fldno,
ISOComponent c,
ISOFieldPackager fld,
boolean logFieldName)
Internal helper logging function.
|
protected ISOFieldPackager |
getBitMapfieldPackager() |
java.lang.String |
getDescription() |
java.lang.String |
getFieldDescription(ISOComponent m,
int fldNumber) |
ISOFieldPackager |
getFieldPackager(int fldNumber) |
protected int |
getFirstField()
usually 2 for normal fields, 1 for bitmap-less or ANSI X9.2
|
int |
getHeaderLength() |
Logger |
getLogger() |
protected int |
getMaxValidField() |
java.lang.String |
getRealm() |
int |
getThirdBitmapField() |
byte[] |
pack(ISOComponent m)
pack method that works in conjunction with
unpack(ISOComponent, byte[]) . |
void |
setFieldPackager(int fldNumber,
ISOFieldPackager fieldPackager) |
void |
setFieldPackager(ISOFieldPackager[] fld) |
void |
setHeaderLength(int len) |
void |
setLogger(Logger logger,
java.lang.String realm) |
void |
setThirdBitmapField(int f) |
int |
unpack(ISOComponent m,
byte[] b) |
void |
unpack(ISOComponent m,
java.io.InputStream in) |
protected ISOFieldPackager[] fld
protected int thirdBitmapField
protected Logger logger
protected boolean logFieldName
protected java.lang.String realm
protected int headerLength
public void setFieldPackager(ISOFieldPackager[] fld)
public void setThirdBitmapField(int f) throws ISOException
ISOException
public int getThirdBitmapField()
protected boolean emitBitMap()
protected int getFirstField()
public byte[] pack(ISOComponent m) throws ISOException
unpack(ISOComponent, byte[])
.
Handles a tertiary bitmap possibly appearing in Data Element thirdBitmapField
.
pack
in interface ISOPackager
m
- the Component to packISOException
public int unpack(ISOComponent m, byte[] b) throws ISOException
unpack
in interface ISOPackager
m
- the Container of this messageb
- ISO message imageISOException
public void unpack(ISOComponent m, java.io.InputStream in) throws java.io.IOException, ISOException
unpack
in interface ISOPackager
java.io.IOException
ISOException
protected static void fieldUnpackLogger(LogEvent evt, int fldno, ISOComponent c, ISOFieldPackager fld, boolean logFieldName) throws ISOException
ISOException
public java.lang.String getFieldDescription(ISOComponent m, int fldNumber)
getFieldDescription
in interface ISOPackager
m
- the Container (i.e. an ISOMsg)fldNumber
- the Field Numberpublic ISOFieldPackager getFieldPackager(int fldNumber)
fldNumber
- the Field Numberpublic void setFieldPackager(int fldNumber, ISOFieldPackager fieldPackager)
fldNumber
- the Field NumberfieldPackager
- the Field Packagerpublic ISOMsg createISOMsg()
createISOMsg
in interface ISOPackager
protected int getMaxValidField()
protected ISOFieldPackager getBitMapfieldPackager()
public void setLogger(Logger logger, java.lang.String realm)
public int getHeaderLength()
public void setHeaderLength(int len)
public java.lang.String getDescription()
getDescription
in interface ISOPackager