public interface ACLCodec
Modifier and Type | Interface and Description |
---|---|
static class |
ACLCodec.CodecException
This exception is thrown when some problem occurs in the concrete parsing
subsystem accessed through this interface.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CHARSET |
Modifier and Type | Method and Description |
---|---|
ACLMessage |
decode(byte[] data,
java.lang.String charset)
Recovers an
ACLMessage object back from raw data,
using the specific message representation to interpret the byte
sequence. |
byte[] |
encode(ACLMessage msg,
java.lang.String charset)
Encodes an
ACLMessage object into a byte sequence,
according to the specific message representation. |
java.lang.String |
getName()
Query the name of the message representation handled by this
Codec object. |
static final java.lang.String DEFAULT_CHARSET
byte[] encode(ACLMessage msg, java.lang.String charset)
ACLMessage
object into a byte sequence,
according to the specific message representation.msg
- The ACL message to encode.charset
- Charset encoding to use (e.g. US_ASCII, UTF-8, etc)ACLMessage decode(byte[] data, java.lang.String charset) throws ACLCodec.CodecException
ACLMessage
object back from raw data,
using the specific message representation to interpret the byte
sequence.data
- The byte sequence containing the encoded message.charset
- Charset encoding to use (e.g. US_ASCII, UTF-8, etc)ACLMessage
object, built from the raw
data.ACLCodec.CodecException
- If some kind of syntax error occurs.java.lang.String getName()
Codec
object. The FIPA standard representations have
a name starting with "fipa.acl.rep."
.