java.lang.Object
cl.netswitch.iso.vip8583.VipEncoder<M>
- Type Parameters:
M
- the type of the VIP message.
Encodes the fields of a
VipMessage
into a sequence of bytes.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal byte[]
Encodes the fields of a message into a sequence of bytes.protected void
postEncode
(M message, ByteArray barray) Called after a message is encoded into the supplied byte array.protected void
Called before a message is encoded into the supplied byte array.
-
Constructor Details
-
VipEncoder
Constructs a newVipEncoder
instance.- Parameters:
fields
- the fields that describe a message.- Throws:
NullPointerException
- iffields
isnull
.VipException
- if required fields are not defined.
-
-
Method Details
-
encode
Encodes the fields of a message into a sequence of bytes.- Parameters:
message
- the message that contains the field values.- Returns:
- the sequence of bytes with the encoded field values.
- Throws:
NullPointerException
- ifmessage
isnull
.VipException
- if an expected encoder error occurs.
-
preEncode
Called before a message is encoded into the supplied byte array.- Parameters:
message
- the message to be encoded intobarray
.barray
- the byte array containing the encoded bytes.- Throws:
NullPointerException
- if an argument isnull
.IsoException
- if an expected encoder error occurs.
-
postEncode
Called after a message is encoded into the supplied byte array.- Parameters:
message
- the message to be encoded intobarray
.barray
- the byte array containing the encoded bytes.- Throws:
NullPointerException
- if an argument isnull
.IsoException
- if an expected encoder error occurs.
-