|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.epfl.lpd.ids.serialization.Message
public class Message
Class implementing the IMessage
specification.
Field Summary | |
---|---|
protected byte[] |
data
The data of the message. |
protected String |
header
The header of the message. |
Constructor Summary | |
---|---|
Message(String header,
byte[] data)
Creates a new instance of Message. |
Method Summary | |
---|---|
byte[] |
getData()
Method used to retrieve the data of the message. |
String |
getHeader()
Method used to retrieved the header of the message. |
void |
setData(byte[] data)
Method used to set the data of the message. |
void |
setHeader(String header)
Method used to set the header of the message. |
String |
toString()
Method used to print this message as a string representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String header
protected byte[] data
Constructor Detail |
---|
public Message(String header, byte[] data)
header
- The header of the message.data
- The data of the message.Method Detail |
---|
public String getHeader()
getHeader
in interface IMessage
public void setHeader(String header)
setHeader
in interface IMessage
header
- The header of the message.public byte[] getData()
getData
in interface IMessage
public void setData(byte[] data)
setData
in interface IMessage
data
- An array of bytes representing the data of the message.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |