|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.io.DatagramAddressBase
net.rim.device.api.io.SmsAddress
public final class SmsAddress
Formats SMS addresses according to the docs in javax.microedition.io.Connector.
Connector,
SMSPacketHeader| Field Summary | ||
|---|---|---|
static byte |
DESTINATION_PORT_INDEX
|
|
static byte |
ORIGINATOR_PORT_INDEX
|
|
static int |
PORT_NBS_RING_TONE
NBS ring tone port |
|
static int |
PORT_NBS_SIMPLE_EMAIL
NBS simple email port |
|
static int |
PORT_NBS_VCALENDAR
NBS vCalendar port |
|
static int |
PORT_NBS_VCARD
NBS vCard port |
|
static int |
PORT_WAP_PUSH
WAP Push connectionless session service (client side) port |
|
| Fields inherited from class net.rim.device.api.io.DatagramAddressBase |
|---|
NONE, _address, _key |
| Constructor Summary | ||
|---|---|---|
SmsAddress()
Constructs a new, empty SmsAddress object with no header information. |
||
SmsAddress(String address)
Constructs a new SmsAddress object based on a formatted string. |
||
SmsAddress(DatagramAddressBase addressBase)
Constructs a new SmsAddress based on a given DatagramAddressBase object. |
||
| Method Summary | ||
|---|---|---|
boolean |
equals(Object addressBase)
Checks whether another DatagramAddressBase object is equal to this SmsAddress. |
|
String |
getAddress()
Get a string representing the SMS address information. |
|
SMSPacketHeader |
getHeader()
Gets the SMS packet header. |
|
int[] |
getPorts()
Get the socket port(s). |
|
int |
hashCode()
Retrieves hash of this object's address. |
|
static String |
makeAddress(boolean open,
SMSPacketHeader header,
int[] ports)
Creates an address string based on the given header information. |
|
void |
setAddress(String address)
Sets the address information of the SMSAddress object given a formatted string. |
|
| Methods inherited from class net.rim.device.api.io.DatagramAddressBase |
|---|
appendHex, appendHex, getKey, getSubAddress, getSubAddressBase, indexOfNextDelim, parseInt, parseInt, parseLong, readInt, readShort, writeInt, writeShort |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte ORIGINATOR_PORT_INDEX
public static final byte DESTINATION_PORT_INDEX
public static final int PORT_NBS_VCARD
public static final int PORT_NBS_VCALENDAR
public static final int PORT_NBS_RING_TONE
public static final int PORT_NBS_SIMPLE_EMAIL
public static final int PORT_WAP_PUSH
| Constructor Detail |
|---|
public SmsAddress()
public SmsAddress(DatagramAddressBase addressBase)
addressBase - A DatagramAddressBase to base the new SmsAddress object on.
If addressBase is an SmsAddress then the new object is a copy of addressBase.
Otherwise a new SmsAddress object is created with the address information from addressBase.public SmsAddress(String address)
address - A string in the format specified above in the class description.| Method Detail |
|---|
public SMSPacketHeader getHeader()
public int[] getPorts()
public void setAddress(String address)
setAddress in class DatagramAddressBaseaddress - A string in the SMS address format specified in the class description.
IllegalArgumentException - if address is not properly formatted.public String getAddress()
getAddress in class DatagramAddressBaseIllegalArgumentException - if any of the parameters specified in the address argument are invalid.public boolean equals(Object addressBase)
equals in class DatagramAddressBaseaddressBase - an address to compare with this SmsAddress
Boolean.hashCode(),
Hashtablepublic int hashCode()
DatagramAddressBase
hashCode in class DatagramAddressBaseObject.equals(java.lang.Object),
Hashtable
public static String makeAddress(boolean open,
SMSPacketHeader header,
int[] ports)
open - A boolean indicating whether the connection is being opened for sending.header - The information used to populate the address string.
If header is null then a string representing an emptry address is created.ports - Socket port(s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal