|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.objectxp.msg.Message
com.objectxp.msg.SmsMessage
com.objectxp.msg.smart.SmartMessage
com.objectxp.msg.smart.OperatorLogo
public class OperatorLogo
This class represents an OperatorLogo message for SmartMessaging enabled phones. The class accepts images of type java.awt.Image. The dimension of operator logos is 14x72 pixels. Images which are larger than this will be cropped to this size.
Example:
...
SmsService service = new GsmSmsService();
...
OperatorLogo logo = new OperatorLogo();
java.awt.Image img = Toolkit.getDefaultToolkit().getImage("c:/img/operator.gif");
logo.setOoperatorLogo(img,"228","02");
logo.setRecipient("+41791234567");
service.sendMessage(logo);
...
For more information about the available country and operator codes see GSM world info
| Field Summary | |
|---|---|
static int |
MAX_HEIGHT
Maximum height of a Operator Logo (14 pixels) |
static int |
MAX_WIDTH
Maximum width of a Operator Logo (72 pixels) |
| Fields inherited from class com.objectxp.msg.SmsMessage |
|---|
CLASS_0, CLASS_1, CLASS_2, CLASS_3, DC_8BIT, DC_DEFAULT, DC_GROUP_DATA, DC_GROUP_GENERAL, DC_GROUP_MSG_WAITING_DISCARD, DC_GROUP_MSG_WAITING_STORE, DC_UCS2, INDICATION_ACTIVE, INDICATION_INACTIVE, INDICATION_TYPE_EMAIL, INDICATION_TYPE_FAX, INDICATION_TYPE_OTHER, INDICATION_TYPE_VOICEMAIL, NO_CLASS |
| Fields inherited from class com.objectxp.msg.Message |
|---|
ACK_TIME, MT_BINARY, MT_STATUS, MT_TEXT, SENDER_TYPE_ALPHA, SENDER_TYPE_GUESS, SENDER_TYPE_NUMBER |
| Constructor Summary | |
|---|---|
OperatorLogo()
Create a new Operator Logo Message. |
|
OperatorLogo(SmsService service)
Deprecated. since jSMS 1.7, use OperatorLogo() |
|
| Method Summary | |
|---|---|
java.lang.String |
getCountryCode()
Returns a String representing the country code. |
java.awt.Image |
getImage()
Transformes and returns the OTA image as Image object. |
java.lang.String |
getMessage()
Get the Message (User Data) as String. |
java.lang.String |
getOperatorCode()
Returns a String representing the operator code. |
byte[] |
getOtaImage()
|
byte[] |
getUserData()
Get the User Data of this message. |
void |
setOperatorLogo(byte[] image)
Set the Operator Logo. |
void |
setOperatorLogo(java.awt.Image img,
java.lang.String countryCode,
java.lang.String operatorCode)
Set the operator logo image. |
java.lang.String |
toString()
Constructs a string representation of this Message |
| Methods inherited from class com.objectxp.msg.smart.SmartMessage |
|---|
buildParts, buildParts, getParts |
| Methods inherited from class com.objectxp.msg.Message |
|---|
clone, getProperty, getSenderType, getTimestamp, setID, setProperty, setSenderType |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_HEIGHT
public static final int MAX_WIDTH
| Constructor Detail |
|---|
public OperatorLogo()
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic OperatorLogo(SmsService service)
OperatorLogo()
service - the initialized SmsService used for sending the message| Method Detail |
|---|
public void setOperatorLogo(byte[] image)
image - the operator logo
java.lang.IllegalArgumentException - if the image is either null or doesn't
contain exactly 133 bytes.public java.lang.String getCountryCode()
public java.lang.String getOperatorCode()
public void setOperatorLogo(java.awt.Image img,
java.lang.String countryCode,
java.lang.String operatorCode)
throws java.lang.IllegalArgumentException
img - a java.awt.Image representing the logo (e.g. GIF or JPEG)countryCode - String representing the country code (e.g. "228"
for Switzerland)operatorCode - String representing the operator code (e.g. "01" for
Swisscom)
java.lang.IllegalArgumentException - if the image, operator code or country code is nullpublic java.lang.String getMessage()
SmsMessage
getMessage in class SmsMessageSmsMessage.getUserData()public byte[] getUserData()
SmsMessage
getUserData in class SmsMessagepublic java.lang.String toString()
Message
toString in class SmsMessagepublic java.awt.Image getImage()
public byte[] getOtaImage()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||