|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Abstract interface for converting ACL messages back and forth between Java objects and raw byte sequences, according to a FIPA ACL message representation.
Nested Class Summary | |
static class |
ACLCodec.CodecException
This exception is thrown when some problem occurs in the concrete parsing subsystem accessed through this interface. |
Field Summary | |
static java.lang.String |
DEFAULT_CHARSET
|
Method Summary | |
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. |
Field Detail |
public static final java.lang.String DEFAULT_CHARSET
Method Detail |
public 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)
public 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.public java.lang.String getName()
Codec
object. The FIPA standard representations have
a name starting with "fipa.acl.rep."
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |