Class XMLPackager
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.jpos.iso.packager.XMLPackager
- All Implemented Interfaces:
ISOPackager, LogSource, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Direct Known Subclasses:
XML2003Packager
packs/unpacks ISOMsgs into XML representation
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Loggerprotected Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) protected XMLReadervoidendElement(String ns, String name, String qname) protected voidfixupBinary(ISOMsg m, int[] bfields) voidforceBinary(int... bfields) getFieldDescription(ISOComponent m, int fldNumber) getRealm()byte[]pack(ISOComponent c) voidvoidsetXMLParserFeature(String fname, boolean val) voidstartElement(String ns, String name, String qName, Attributes atts) intunpack(ISOComponent c, byte[] b) voidunpack(ISOComponent c, InputStream in) Methods inherited from class DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
logger
-
realm
-
ISOMSG_TAG
- See Also:
-
ISOFIELD_TAG
- See Also:
-
ID_ATTR
-
VALUE_ATTR
- See Also:
-
TYPE_ATTR
-
TYPE_BINARY
- See Also:
-
TYPE_BITMAP
- See Also:
-
TYPE_AMOUNT
- See Also:
-
CURRENCY_ATTR
- See Also:
-
HEADER_TAG
- See Also:
-
ENCODING_ATTR
- See Also:
-
ASCII_ENCODING
- See Also:
-
-
Constructor Details
-
XMLPackager
- Throws:
ISOException
-
-
Method Details
-
forceBinary
-
pack
- Specified by:
packin interfaceISOPackager- Parameters:
c- the Component to pack- Returns:
- Message image
- Throws:
ISOException- on error
-
unpack
- Specified by:
unpackin interfaceISOPackager- Parameters:
c- the Container of this messageb- ISO message image- Returns:
- consumed bytes
- Throws:
ISOException- on error
-
unpack
- Specified by:
unpackin interfaceISOPackager- Throws:
ISOExceptionIOException
-
startElement
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
fixupBinary
- Throws:
ISOException
-
getFieldDescription
- Specified by:
getFieldDescriptionin interfaceISOPackager- Parameters:
m- the Container (i.e. an ISOMsg)fldNumber- the Field Number- Returns:
- Field Description
-
setLogger
-
getRealm
-
getLogger
-
createISOMsg
- Specified by:
createISOMsgin interfaceISOPackager- Returns:
- an ISOMsg
-
getDescription
- Specified by:
getDescriptionin interfaceISOPackager- Returns:
- Packager's Description
-
createXMLReader
- Throws:
SAXException
-
setXMLParserFeature
- Throws:
SAXException
-