Methods Summary |
---|
public java.lang.String | getAddress()Gets the address from the message object as a String . If no
address is found in the message, this method returns null .
If the method is applied to an inbound message, the source address is
returned. If it is applied to an outbound message, the destination
address is returned.
The following code sample retrieves the address from a received message.
...
Message msg = conn.receive();
String addr = msg.getAddress();
...
...
return msgAddress;
|
public abstract java.util.Date | getTimestamp()Returns the timestamp indicating when this message has been
sent.
|
public abstract void | setAddress(java.lang.String addr)Sets the address part of the message object. The address is a
String and must be in the format:
protocol://phone_number:[port]
The following code sample assigns an address to the Message
object.
...
String addr = "protocol://+123456789";
Message msg = newMessage(MessageConnection.TEXT_MESSAGE);
msg.setAddress(addr);
...
|
public void | setAddress(com.sun.tck.wma.Message reference)(May be deleted) Set message address, copying the address
from another message.
setAddress(reference.getAddress());
|
public void | setTimeStamp(long timestamp)Sets the timestamp for inbound SMS messages.
sentAt = timestamp;
|