com.acap.rudp.core
Class Message

java.lang.Object
  extended by com.acap.rudp.core.Message

public class Message
extends java.lang.Object

Represents a variable length JSON message.


Constructor Summary
Message(byte[] body)
           
Message(JSONObject j)
          Creates a new message instance to be sent
 
Method Summary
 JSONObject getJSON()
           
 long getTimestamp()
           
 byte[] toBytes()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message(JSONObject j)
        throws JSONException
Creates a new message instance to be sent

Throws:
JSONException

Message

public Message(byte[] body)
        throws JSONException
Throws:
JSONException
Method Detail

getTimestamp

public long getTimestamp()

getJSON

public JSONObject getJSON()

toBytes

public byte[] toBytes()