public class ISO8583II extends java.lang.Object implements ISOConstants
AUTHORISATION, AUTHORISATION_REPEAT, AUTHORISATION_RESPONSE, CASH_ADVANCE, CLEARING_REQUEST, CLEARING_REQUEST_RESPONSE, ENC_CODED, ENC_LLLLPLAIN, ENC_PACKED, ENC_PLAIN, mandatoryBits, MSG_MAX_LENGTH, MTID, MTISTRING, NETWORK_REQUEST, NETWORK_RESPONSE, optionalBits, ORDINAL_PURCHASE, PROCS, PROCSTR, REVAERSAL_RESPONSE, REVERSAL, REVERSAL_REPEAT, SMS_AUTHORISATION, SMS_AUTHORISATION_REPEAT, SMS_AUTHORISATION_RESPONSE, UNATTENDED_PURCHASE, V1987, V1993, V2003
Constructor and Description |
---|
ISO8583II()
Class constructor
|
ISO8583II(Config con)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
byte[] |
createBinLenPackedValue(ISOField f)
Method createBinLenPackedValue
|
byte[] |
createPackedValue(ISOField f) |
byte[] |
createPlainValue(ISOField f,
boolean ebcdic) |
byte[] |
formatEncoded(Message msg)
Formats message in packed and encoded format
|
byte[] |
formatLL00Plain(Message msg)
Formats the message in plain format with 4 byte packed length whre only 2 bytes are used as length
Note: supports fields FH_IDENT, FH_DCP, FF_FOT if they are configured |
byte[] |
formatLLLLPlain(Message msg)
Formats the message in plain format with 4 byte length
Note: supports fields FH_IDENT, FH_DCP, FF_FOT if they are configured |
byte[] |
formatLLPacked(Message msg) |
byte[] |
formatLLPlain(Message msg)
Formats the message in plain format with two byte length
Note: supports fields FH_IDENT, FH_DCP, FF_FOT if they are configured |
byte[] |
formatPacked(Message msg)
Method to format message in packed format
|
byte[] |
formatPlain(Message msg)
Formats the message in plain format
Note: supports fields FH_IDENT, FH_DCP, FF_FOT if they are configured |
Config |
getConfig() |
int |
getDebuglevel() |
byte[] |
getEncoded(byte[] in)
gets the encoded data block from syntax 2
|
byte[] |
getEncoded(java.io.InputStream is)
gets the encoded data block from syntax 2 encoded stream
|
int |
getEncodingType(byte[] msg)
checks the ISO message encoding type from bye[] array
|
int |
getEncodingType(java.io.PushbackInputStream is)
checks the ISO message encoding type from stream
|
java.io.PrintStream |
getOutput() |
Message |
parseLL00Plain(java.io.InputStream is)
parses the LL00plain format from inputstream (where LL00 is 4 byte (packed/binary length) but only first 2 bytes of length are used
Note: supports fields FH_IDENT, FH_DCP, FF_FOTif they are configured
|
Message |
parseLLLLPlain(java.io.InputStream is)
parses the LLLLplain format from inputstream
Note: supports fields FH_IDENT, FH_DCP, FF_FOTif they are configured
|
Message |
parseLLPacked(java.io.InputStream is) |
Message |
parseLLPlain(java.io.InputStream is)
parses the LLplain format from inputstream (where LL is two byte (packed/binary length)
Note: supports fields FH_IDENT, FH_DCP, FF_FOTif they are configured
|
Message |
parsePacked(byte[] in)
parses the packed ISO8583 format from buffer
|
Message |
parsePacked(java.io.InputStream is)
parses the packed ISO8583 format from stream
|
Message |
parsePlain(byte[] buf)
parses the plain format from byte buffer
Note: supports fields FH_IDENT, FH_DCP, FF_FOT if they are configured |
Message |
parsePlain(java.io.InputStream is)
parses the plain format from inputstream
Note: supports fields FH_IDENT, FH_DCP, FF_FOT if they are configured |
ISOField |
parsePlainField(java.io.DataInputStream dis,
int i,
int ver)
Parses current field from underlying stream from its currecnt position
(used internally)
|
Message |
parseStream(java.io.InputStream is)
Parses and detects near any ISO8583 format from InputStream (without custom headers used)
recognizes automatically messages without headers and with length in plain or encoded fromat
Messages with header fields before MTI cannot be parsed with this |
void |
setConfig(Config con) |
void |
setDebuglevel(int debuglevel) |
void |
setOutput(java.io.PrintStream os)
Set the debug output stream
|
void |
validateFields(Message flds)
validates if the fields Message contains reflect the type and format required
or if there are fields not compatible with required length and type
then throws
an ISOException
|
public ISO8583II()
public ISO8583II(Config con)
con
- - hte configuration to usepublic void setConfig(Config con)
con
- public Config getConfig()
public void setOutput(java.io.PrintStream os)
os
- public java.io.PrintStream getOutput()
public int getDebuglevel()
public void setDebuglevel(int debuglevel)
debuglevel
- The debuglevel to set. (0..5)public final int getEncodingType(java.io.PushbackInputStream is) throws java.lang.Exception
is
- the message data streamjava.lang.Exception
- if errorpublic final int getEncodingType(byte[] msg) throws java.lang.Exception
msg
- the message datajava.lang.Exception
public final byte[] getEncoded(byte[] in) throws java.lang.Exception
in
- java.lang.Exception
public final byte[] getEncoded(java.io.InputStream is) throws java.lang.Exception
is
- java.lang.Exception
public final byte[] formatLLPacked(Message msg) throws java.lang.Exception
java.lang.Exception
public final byte[] formatPacked(Message msg) throws java.lang.Exception
msg
- the message object with fields to formatjava.lang.Exception
public final byte[] formatEncoded(Message msg) throws java.lang.Exception
msg
- the message object with fields to formatjava.lang.Exception
public final byte[] formatPlain(Message msg) throws java.lang.Exception
msg
- the message object to be formattedjava.lang.Exception
public final byte[] formatLLPlain(Message msg) throws java.lang.Exception
msg
- the message object to be formattedjava.lang.Exception
public final byte[] formatLL00Plain(Message msg) throws java.lang.Exception
msg
- the message object to be formattedjava.lang.Exception
public final byte[] formatLLLLPlain(Message msg) throws java.lang.Exception
msg
- the message object to be formattedjava.lang.Exception
public final Message parseStream(java.io.InputStream is) throws java.lang.Exception
is
- the inputsream to parsejava.lang.Exception
public final Message parsePacked(byte[] in) throws java.lang.Exception
in
- bytes to parsejava.lang.Exception
public final Message parseLLPacked(java.io.InputStream is) throws java.lang.Exception
java.lang.Exception
public final Message parsePacked(java.io.InputStream is) throws java.lang.Exception
is
- java.lang.Exception
public final Message parseLLPlain(java.io.InputStream is) throws java.lang.Exception
is
- the inputstreamjava.lang.Exception
public final Message parseLL00Plain(java.io.InputStream is) throws java.lang.Exception
is
- the inputstreamjava.lang.Exception
public final Message parseLLLLPlain(java.io.InputStream is) throws java.lang.Exception
is
- inputstreamjava.lang.Exception
public final Message parsePlain(byte[] buf) throws java.lang.Exception
buf
- - the byte buffer to parsejava.lang.Exception
public final Message parsePlain(java.io.InputStream is) throws java.lang.Exception
is
- - the inputstreamjava.lang.Exception
public final void validateFields(Message flds) throws java.lang.Exception
flds
- - the message to validatejava.lang.Exception
- if not all fields validpublic final ISOField parsePlainField(java.io.DataInputStream dis, int i, int ver) throws java.lang.Exception
dis
- i
- - field numberver
- - the ISO8583 version (0, 1)java.lang.Exception
public final byte[] createPackedValue(ISOField f)
public final byte[] createBinLenPackedValue(ISOField f)
public final byte[] createPlainValue(ISOField f, boolean ebcdic)
f
- field of value to create fromebcdic
- if in ebcdic encodingCopyright © 2002-2015 AZS Services Ltd. All Rights Reserved.