|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.panama.messaging.common.EncodedSMS
This class can be used to pass encoded binary/text messages to the transport layer. By default, it assumes a message to be binary, with DCS = 0xF5, PID = 0x00. An encoded SMS can contain many encoded SMS segment. Each segment contains data part and header part. An example to create an encoded SMS is shown below.
Message msg = new Message(); EncodedSMS encodedSMS = new EncodedSMS(); EncodedSMSSegment seg1 = new EncodedSMSSegment(); String data1 = "424547494E3A56434152440D0A56455253494F4E3A322E310D0A"+ "464E3A56696A69206E6F74207365656E0D0A4E3A766A3B766A0D0A"+ "54454C3B4641583A35313037313030350D0A454D41494C3B494E5445524E45543A"+ "6162632E736D697468406E6F6B69612E636F6D0D0A454E443A56434152440D0A"; seg1.setData(Conversion.toBytes(data1)); seg1.setHeader(Conversion.toBytes("0E0003010101140700007600090000")); Vector segs = new Vector(); segs.add(seg1); encodedSMS.setSegments(segs); msg.setContent(encodedSMS); msg.setContentType(encodedSMS.MIME);
EncodedSMSSegment
, Serialized FormField Summary | |
static java.lang.String |
MIME MIME type for Encoded SMS. |
Constructor Summary | |
EncodedSMS() Creates an Encoded SMS object with DCS=0xF5 and PID=0x00. |
Method Summary | |
boolean |
equals(java.lang.Object other) Compares two EncodedSMS for equality. |
byte |
getDcs() Gets the Data coding scheme. |
byte |
getPid() Gets the protocol identifier of the Encoded SMS. |
java.util.Vector |
getSegments() Gets the Segments of the Encoded SMS. |
int |
hashCode() Generates and returns the hash code for the instance. |
void |
setDcs(byte dcs) Sets data coding scheme. |
void |
setPid(byte pid) Sets protocol identifier. |
void |
setSegments(java.util.Vector segments) Set the segments of the encoded SMS message. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MIME
Constructor Detail |
public EncodedSMS()
Method Detail |
public boolean equals(java.lang.Object other)
other
- EncodedSMS instance that is to be compared with "this" object.public byte getDcs()
public byte getPid()
public java.util.Vector getSegments()
public int hashCode()
public void setDcs(byte dcs)
dcs
- value for the scheme. Default is 0xF5public void setPid(byte pid)
pid
- value of identifier. Default is 0x00.public void setSegments(java.util.Vector segments)
|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |