public class XMLPackager extends org.xml.sax.helpers.DefaultHandler implements ISOPackager, LogSource
ISOPackager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASCII_ENCODING |
static java.lang.String |
CURRENCY_ATTR |
static java.lang.String |
ENCODING_ATTR |
static java.lang.String |
HEADER_TAG |
static java.lang.String |
ID_ATTR |
static java.lang.String |
ISOFIELD_TAG |
static java.lang.String |
ISOMSG_TAG |
protected Logger |
logger |
protected java.lang.String |
realm |
static java.lang.String |
TYPE_AMOUNT |
static java.lang.String |
TYPE_ATTR |
static java.lang.String |
TYPE_BINARY |
static java.lang.String |
TYPE_BITMAP |
static java.lang.String |
VALUE_ATTR |
Constructor and Description |
---|
XMLPackager() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
ISOMsg |
createISOMsg() |
protected org.xml.sax.XMLReader |
createXMLReader() |
void |
endElement(java.lang.String ns,
java.lang.String name,
java.lang.String qname) |
protected void |
fixupBinary(ISOMsg m,
int[] bfields) |
void |
forceBinary(int... bfields) |
java.lang.String |
getDescription() |
java.lang.String |
getFieldDescription(ISOComponent m,
int fldNumber) |
Logger |
getLogger() |
java.lang.String |
getRealm() |
byte[] |
pack(ISOComponent c) |
void |
setLogger(Logger logger,
java.lang.String realm) |
void |
setXMLParserFeature(java.lang.String fname,
boolean val) |
void |
startElement(java.lang.String ns,
java.lang.String name,
java.lang.String qName,
org.xml.sax.Attributes atts) |
int |
unpack(ISOComponent c,
byte[] b) |
void |
unpack(ISOComponent c,
java.io.InputStream in) |
protected Logger logger
protected java.lang.String realm
public static final java.lang.String ISOMSG_TAG
public static final java.lang.String ISOFIELD_TAG
public static final java.lang.String ID_ATTR
public static final java.lang.String VALUE_ATTR
public static final java.lang.String TYPE_ATTR
public static final java.lang.String TYPE_BINARY
public static final java.lang.String TYPE_BITMAP
public static final java.lang.String TYPE_AMOUNT
public static final java.lang.String CURRENCY_ATTR
public static final java.lang.String HEADER_TAG
public static final java.lang.String ENCODING_ATTR
public static final java.lang.String ASCII_ENCODING
public XMLPackager() throws ISOException
ISOException
public void forceBinary(int... bfields)
public byte[] pack(ISOComponent c) throws ISOException
pack
in interface ISOPackager
c
- the Component to packISOException
- on errorpublic int unpack(ISOComponent c, byte[] b) throws ISOException
unpack
in interface ISOPackager
c
- the Container of this messageb
- ISO message imageISOException
- on errorpublic void unpack(ISOComponent c, java.io.InputStream in) throws ISOException, java.io.IOException
unpack
in interface ISOPackager
ISOException
java.io.IOException
public void startElement(java.lang.String ns, java.lang.String name, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
public void endElement(java.lang.String ns, java.lang.String name, java.lang.String qname) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
protected void fixupBinary(ISOMsg m, int[] bfields) 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 void setLogger(Logger logger, java.lang.String realm)
public ISOMsg createISOMsg()
createISOMsg
in interface ISOPackager
public java.lang.String getDescription()
getDescription
in interface ISOPackager
protected org.xml.sax.XMLReader createXMLReader() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setXMLParserFeature(java.lang.String fname, boolean val) throws org.xml.sax.SAXException
org.xml.sax.SAXException