Package jade.lang.acl
Class LEAPACLCodec
- java.lang.Object
-
- jade.lang.acl.LEAPACLCodec
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jade.lang.acl.ACLCodec
ACLCodec.CodecException
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from interface jade.lang.acl.ACLCodec
DEFAULT_CHARSET
-
-
Constructor Summary
Constructors Constructor Description LEAPACLCodec()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ACLMessagedecode(byte[] data, String charset)Recovers anACLMessageobject back from raw data, using the specific message representation to interpret the byte sequence.static ACLMessagedeserializeACL(DataInputStream dis)static AIDdeserializeAID(DataInputStream dis)byte[]encode(ACLMessage msg, String charset)Encodes anACLMessageobject into a byte sequence, according to the specific message representation.StringgetName()Query the name of the message representation handled by thisCodecobject.static voidserializeACL(ACLMessage msg, DataOutputStream dos)static voidserializeAID(AID id, DataOutputStream dos)
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
encode
public byte[] encode(ACLMessage msg, String charset)
Encodes anACLMessageobject into a byte sequence, according to the specific message representation.
-
decode
public ACLMessage decode(byte[] data, String charset) throws ACLCodec.CodecException
Recovers anACLMessageobject back from raw data, using the specific message representation to interpret the byte sequence.- Specified by:
decodein interfaceACLCodec- Parameters:
data- The byte sequence containing the encoded message.charset- This parameter is not taken into account- Returns:
- A new
ACLMessageobject, built from the raw data. - Throws:
ACLCodec.CodecException- If some kind of syntax error occurs.
-
getName
public String getName()
Query the name of the message representation handled by thisCodecobject. The FIPA standard representations have a name starting with"fipa.acl.rep.".
-
serializeACL
public static final void serializeACL(ACLMessage msg, DataOutputStream dos) throws IOException
- Throws:
IOException
-
deserializeACL
public static final ACLMessage deserializeACL(DataInputStream dis) throws IOException
- Throws:
IOException
-
serializeAID
public static final void serializeAID(AID id, DataOutputStream dos) throws IOException
- Throws:
IOException
-
deserializeAID
public static final AID deserializeAID(DataInputStream dis) throws IOException
- Throws:
IOException
-
-