ACLCodec.CodecException
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
DEFAULT_CHARSET
Constructor and Description |
---|
LEAPACLCodec() |
Modifier and Type | Method and Description |
---|---|
ACLMessage |
decode(byte[] data,
String charset)
Recovers an
ACLMessage object back from raw data,
using the specific message representation to interpret the byte
sequence. |
static ACLMessage |
deserializeACL(DataInputStream dis) |
static AID |
deserializeAID(DataInputStream dis) |
byte[] |
encode(ACLMessage msg,
String charset)
Encodes an
ACLMessage object into a byte sequence,
according to the specific message representation. |
String |
getName()
Query the name of the message representation handled by this
Codec object. |
static void |
serializeACL(ACLMessage msg,
DataOutputStream dos) |
static void |
serializeAID(AID id,
DataOutputStream dos) |
private static void |
serializeProperties(Properties props,
DataOutputStream dos) |
public static String NAME
public byte[] encode(ACLMessage msg, String charset)
ACLMessage
object into a byte sequence,
according to the specific message representation.public ACLMessage decode(byte[] data, 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 String getName()
Codec
object. The FIPA standard representations have
a name starting with "fipa.acl.rep."
.public static final void serializeACL(ACLMessage msg, DataOutputStream dos) throws IOException
IOException
public static final ACLMessage deserializeACL(DataInputStream dis) throws IOException
IOException
public static final void serializeAID(AID id, DataOutputStream dos) throws IOException
IOException
public static final AID deserializeAID(DataInputStream dis) throws IOException
IOException
private static final void serializeProperties(Properties props, DataOutputStream dos) throws IOException
IOException