Class XML2003Packager
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.jpos.iso.packager.XMLPackager
org.jpos.iso.packager.XML2003Packager
- All Implemented Interfaces:
ISOPackager, LogSource, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
packs/unpacks ISOMsgs into XML representation
- See Also:
-
Field Summary
Fields inherited from class XMLPackager
ASCII_ENCODING, CURRENCY_ATTR, DATASET_TAG, ELEMENT_TAG, ENCODING_ATTR, FORMAT_ATTR, HEADER_TAG, ID_ATTR, ISOFIELD_TAG, ISOMSG_TAG, logger, realm, TYPE_AMOUNT, TYPE_ATTR, TYPE_BINARY, TYPE_BITMAP, TYPE_DATASET, VALUE_ATTRModifier and TypeFieldDescriptionstatic final StringLiteral name for ASCII encoding declarations.static final StringXML attribute name holding currency metadata.static final StringXML element name used for datasets.static final StringXML element name used for dataset elements.static final StringXML attribute name used for charset declarations.static final StringXML attribute name holding dataset format metadata.static final StringXML element name used for message headers.static final StringXML attribute name holding field identifiers.static final StringXML element name used for ISO fields.static final StringXML element name used for ISO messages.protected LoggerLogger used to emit pack/unpack events.protected StringLogging realm associated with this packager.static final StringXML type marker for amount field content.static final StringXML attribute name holding type metadata.static final StringXML type marker for binary field content.static final StringXML type marker for bitmap field content.static final StringXML type marker for dataset field content.static final StringXML attribute name holding scalar values. -
Constructor Summary
ConstructorsConstructorDescriptionCreates the packager and forces field 72 to be treated as binary. -
Method Summary
Methods inherited from class XMLPackager
characters, createISOMsg, createXMLReader, endElement, fixupBinary, forceBinary, getDescription, getFieldDescription, getLogger, getRealm, pack, setLogger, setXMLParserFeature, startElement, unpack, unpackModifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Creates and returns a new ISOMsg instance appropriate for this packager.protected XMLReaderCreates the SAX reader used to parse XML ISO messages.voidendElement(String ns, String name, String qname) protected voidfixupBinary(ISOMsg m, int[] bfields) Converts selected message fields from hexadecimal strings into binary values.voidforceBinary(int... bfields) Marks the supplied fields so their XML values are always decoded as binary.Returns a human-readable description of this packager.getFieldDescription(ISOComponent m, int fldNumber) Emits a description of the field identified byfldnoin the given message to the log event.Returns the Logger associated with this source.getRealm()Returns the log realm associated with this source.byte[]pack(ISOComponent c) Packs an ISO-8583 message into a byte array.voidAttaches aLoggerand realm to this log source.voidsetXMLParserFeature(String fname, boolean val) Sets a SAX feature on the underlying XML parser.voidstartElement(String ns, String name, String qName, Attributes atts) intunpack(ISOComponent c, byte[] b) Unpacks an ISO-8583 byte array into the given message container.voidunpack(ISOComponent c, InputStream in) Unpacks an ISO-8583 message from an input stream into the given container.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
-
Constructor Details
-
XML2003Packager
Creates the packager and forces field 72 to be treated as binary.- Throws:
ISOException- if the underlying XMLPackager fails to initialise
-