org.marre.sms
Class SmsTextMessage

java.lang.Object
  extended byorg.marre.sms.SmsConcatMessage
      extended byorg.marre.sms.SmsTextMessage
All Implemented Interfaces:
SmsMessage
Direct Known Subclasses:
SmsMsgWaitingMessage

public class SmsTextMessage
extends SmsConcatMessage

Represents a text message.

The text can be sent in unicode (max 70 chars/SMS), 8-bit (max 140 chars/SMS) or GSM encoding (max 160 chars/SMS).

Version:
$Id: SmsTextMessage.java,v 1.27 2005/05/12 07:49:41 c95men Exp $
Author:
Markus Eriksson

Constructor Summary
SmsTextMessage(java.lang.String theMsg)
          Creates an SmsTextMessage with default 7Bit GSM Alphabet
SmsTextMessage(java.lang.String theMsg, int theAlphabet, byte theMessageClass)
          Creates an SmsTextMessage with the given alphabet and message class.
SmsTextMessage(java.lang.String theMsg, SmsDcs theDcs)
          Creates an SmsTextMessage with the given dcs.
 
Method Summary
 SmsDcs getDcs()
          Returns the dcs.
 java.lang.String getText()
          Returns the text message.
 SmsUdhElement[] getUdhElements()
          Returns null.
 SmsUserData getUserData()
          Returns the user data.
 void setText(java.lang.String text)
          Sets the text.
 void setText(java.lang.String text, SmsDcs dcs)
          Sets the text.
 
Methods inherited from class org.marre.sms.SmsConcatMessage
getPdus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmsTextMessage

public SmsTextMessage(java.lang.String theMsg,
                      SmsDcs theDcs)
Creates an SmsTextMessage with the given dcs.

Parameters:
theMsg - The message
theDcs - The data coding scheme

SmsTextMessage

public SmsTextMessage(java.lang.String theMsg,
                      int theAlphabet,
                      byte theMessageClass)
Creates an SmsTextMessage with the given alphabet and message class.

theAlphabet can be any of:
- SmsConstants.ALPHABET_GSM
- SmsConstants.ALPHABET_8BIT
- SmsConstants.ALPHABET_UCS2

theMessageClass can be any of:
- SmsConstants.MSG_CLASS_0 (Often called a FLASH message)
- SmsConstants.MSG_CLASS_1
- SmsConstants.MSG_CLASS_2
- SmsConstants.MSG_CLASS_3

Parameters:
theMsg - The message
theAlphabet - The alphabet
theMessageClass - The messageclass

SmsTextMessage

public SmsTextMessage(java.lang.String theMsg)
Creates an SmsTextMessage with default 7Bit GSM Alphabet

Parameters:
theMsg - The message
Method Detail

getText

public java.lang.String getText()
Returns the text message.


setText

public void setText(java.lang.String text)
Sets the text.

Parameters:
text -

setText

public void setText(java.lang.String text,
                    SmsDcs dcs)
Sets the text.

Parameters:
text -

getDcs

public SmsDcs getDcs()
Returns the dcs.


getUserData

public SmsUserData getUserData()
Returns the user data.

Specified by:
getUserData in class SmsConcatMessage
Returns:
user data

getUdhElements

public SmsUdhElement[] getUdhElements()
Returns null.

Specified by:
getUdhElements in class SmsConcatMessage
Returns:
the UDH as SmsUdhElements


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.