Class NativePackager
java.lang.Object
org.jpos.iso.packager.NativePackager
- All Implemented Interfaces:
ISOPackager
ISOPackager that round-trips messages via Java serialization.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates and returns a new ISOMsg instance appropriate for this packager.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.byte[]pack(ISOComponent c) Packs an ISO-8583 message into a byte array.intunpack(ISOComponent m, byte[] b) Unpacks an ISO-8583 byte array into the given message container.voidunpack(ISOComponent m, InputStream in) Unpacks an ISO-8583 message from an input stream into the given container.
-
Constructor Details
-
NativePackager
public NativePackager()Default constructor; no instance state to initialise.
-
-
Method Details
-
pack
Description copied from interface:ISOPackagerPacks an ISO-8583 message into a byte array.- Specified by:
packin interfaceISOPackager- Parameters:
c- the Component to pack- Returns:
- Message image
- Throws:
ISOException- on packing error
-
unpack
Description copied from interface:ISOPackagerUnpacks an ISO-8583 byte array into the given message container.- Specified by:
unpackin interfaceISOPackager- Parameters:
m- the Container of this messageb- ISO message image- Returns:
- consumed bytes
- Throws:
ISOException- on unpacking error
-
unpack
Description copied from interface:ISOPackagerUnpacks an ISO-8583 message from an input stream into the given container.- Specified by:
unpackin interfaceISOPackager- Parameters:
m- the containerin- the input stream- Throws:
IOException- on I/O failureISOException- on unpacking error
-
getDescription
Description copied from interface:ISOPackagerReturns a human-readable description of this packager.- Specified by:
getDescriptionin interfaceISOPackager- Returns:
- Packager's Description
-
getFieldDescription
Description copied from interface:ISOPackagerEmits a description of the field identified byfldnoin the given message to the log event.- Specified by:
getFieldDescriptionin interfaceISOPackager- Parameters:
m- the Container (i.e. an ISOMsg)fldNumber- the Field Number- Returns:
- Field Description
-
createISOMsg
Description copied from interface:ISOPackagerCreates and returns a new ISOMsg instance appropriate for this packager.- Specified by:
createISOMsgin interfaceISOPackager- Returns:
- a new ISOMsg
-