public class LEAPACLCodec extends java.lang.Object implements ACLCodec
ACLCodec.CodecException
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
DEFAULT_CHARSET
Constructor and Description |
---|
LEAPACLCodec() |
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. |
static ACLMessage |
deserializeACL(java.io.DataInputStream dis) |
static AID |
deserializeAID(java.io.DataInputStream dis) |
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 void |
serializeACL(ACLMessage msg,
java.io.DataOutputStream dos) |
static void |
serializeAID(AID id,
java.io.DataOutputStream dos) |
public static final java.lang.String NAME
public byte[] encode(ACLMessage msg, java.lang.String charset)
ACLMessage
object into a byte sequence,
according to the specific message representation.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.decode
in interface ACLCodec
data
- The byte sequence containing the encoded message.charset
- This parameter is not taken into accountACLMessage
object, built from the raw
data.CodecException
- If some kind of syntax error occurs.ACLCodec.CodecException
public java.lang.String getName()
Codec
object. The FIPA standard representations have
a name starting with "fipa.acl.rep."
.public static final void serializeACL(ACLMessage msg, java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException
public static final ACLMessage deserializeACL(java.io.DataInputStream dis) throws java.io.IOException
java.io.IOException
public static final void serializeAID(AID id, java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException
public static final AID deserializeAID(java.io.DataInputStream dis) throws java.io.IOException
java.io.IOException