org.jpos.iso.packager
Class XML2003Packager
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.jpos.iso.packager.XML2003Packager
- All Implemented Interfaces:
- ISOPackager, LogSource, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class XML2003Packager
- extends DefaultHandler
- implements ISOPackager, LogSource
packs/unpacks ISOMsgs into XML representation
- Version:
- $Id: XMLPackager.java 2594 2008-01-22 16:41:31Z apr $
- Author:
- apr@cs.com.uy
- See Also:
ISOPackager
|
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
ISOMsg |
createISOMsg()
|
void |
endElement(String ns,
String name,
String qname)
|
String |
getDescription()
|
String |
getFieldDescription(ISOComponent m,
int fldNumber)
|
Logger |
getLogger()
|
String |
getRealm()
|
byte[] |
pack(ISOComponent c)
|
void |
setLogger(Logger logger,
String realm)
|
void |
startElement(String ns,
String name,
String qName,
Attributes atts)
|
int |
unpack(ISOComponent c,
byte[] b)
|
void |
unpack(ISOComponent c,
InputStream in)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected Logger logger
realm
protected String realm
ISOMSG_TAG
public static final String ISOMSG_TAG
- See Also:
- Constant Field Values
ISOFIELD_TAG
public static final String ISOFIELD_TAG
- See Also:
- Constant Field Values
ID_ATTR
public static final String ID_ATTR
- See Also:
- Constant Field Values
VALUE_ATTR
public static final String VALUE_ATTR
- See Also:
- Constant Field Values
TYPE_ATTR
public static final String TYPE_ATTR
- See Also:
- Constant Field Values
TYPE_BINARY
public static final String TYPE_BINARY
- See Also:
- Constant Field Values
TYPE_BITMAP
public static final String TYPE_BITMAP
- See Also:
- Constant Field Values
TYPE_AMOUNT
public static final String TYPE_AMOUNT
- See Also:
- Constant Field Values
CURRENCY_ATTR
public static final String CURRENCY_ATTR
- See Also:
- Constant Field Values
HEADER_TAG
public static final String HEADER_TAG
- See Also:
- Constant Field Values
BINARY_FIELDS
public static final int[] BINARY_FIELDS
XML2003Packager
public XML2003Packager()
throws ISOException
- Throws:
ISOException
pack
public byte[] pack(ISOComponent c)
throws ISOException
- Specified by:
pack in interface ISOPackager
- Parameters:
c - the Component to pack
- Returns:
- Message image
- Throws:
ISOException - on error
unpack
public int unpack(ISOComponent c,
byte[] b)
throws ISOException
- Specified by:
unpack in interface ISOPackager
- Parameters:
c - the Container of this messageb - ISO message image
- Returns:
- consumed bytes
- Throws:
ISOException - on error
unpack
public void unpack(ISOComponent c,
InputStream in)
throws ISOException,
IOException
- Specified by:
unpack in interface ISOPackager
- Throws:
ISOException
IOException
startElement
public void startElement(String ns,
String name,
String qName,
Attributes atts)
throws SAXException
- Specified by:
startElement in interface ContentHandler- Overrides:
startElement in class DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
- Specified by:
characters in interface ContentHandler- Overrides:
characters in class DefaultHandler
endElement
public void endElement(String ns,
String name,
String qname)
throws SAXException
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class DefaultHandler
- Throws:
SAXException
getFieldDescription
public String getFieldDescription(ISOComponent m,
int fldNumber)
- Specified by:
getFieldDescription in interface ISOPackager
- Parameters:
m - the Container (i.e. an ISOMsg)fldNumber - the Field Number
- Returns:
- Field Description
setLogger
public void setLogger(Logger logger,
String realm)
- Specified by:
setLogger in interface LogSource
getRealm
public String getRealm()
- Specified by:
getRealm in interface LogSource
getLogger
public Logger getLogger()
- Specified by:
getLogger in interface LogSource
createISOMsg
public ISOMsg createISOMsg()
- Specified by:
createISOMsg in interface ISOPackager
- Returns:
- an ISOMsg
getDescription
public String getDescription()
- Specified by:
getDescription in interface ISOPackager
- Returns:
- Packager's Description
Copyright © 1998-2012 jPOS.org. All Rights Reserved.