Class AmexDecoder<M extends AmexMessage>
java.lang.Object
cl.netswitch.iso.amex8583.AmexDecoder<M>
- Type Parameters:
M- the type of the AMEX message.
Decodes a sequence of bytes into the fields of an
AmexMessage.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidDecodes a sequence of bytes into the fields of a message.protected voidpostDecode(ByteBuffer buffer, M message) Called after a message is decoded from the supplied byte buffer.protected voidpreDecode(ByteBuffer buffer, M message) Called before a message is decoded from the supplied byte buffer.
-
Constructor Details
-
AmexDecoder
Constructs a newAmexDecoderinstance.- Parameters:
fields- the fields that describe a message.- Throws:
NullPointerException- iffieldsisnull.AmexException- if required fields are not defined.
-
-
Method Details
-
decode
Decodes a sequence of bytes into the fields of a message.- Parameters:
bytes- the bytes to be decoded into message.message- the message where decoded fields are stored.- Throws:
NullPointerException- if an argument isnull.AmexException- if an unexpected decoder error occurs.
-
preDecode
Called before a message is decoded from the supplied byte buffer.- Parameters:
buffer- the buffer containing the bytes to be decoded.message- the message where decoded fields are stored.- Throws:
NullPointerException- if an argument isnull.AmexException- if an expected decoder error occurs.
-
postDecode
Called after a message is decoded from the supplied byte buffer.- Parameters:
buffer- the buffer containing the bytes to be decoded.message- the message where decoded fields are stored.- Throws:
NullPointerException- if an argument isnull.AmexException- if an expected decoder error occurs.
-