org.marre.sms
Class SmsPdu

java.lang.Object
  extended byorg.marre.sms.SmsPdu

public class SmsPdu
extends java.lang.Object

Represents an SMS pdu

A SMS pdu consists of a user data header (UDH) and the actual content often called user data (UD).

Version:
$Id: SmsPdu.java,v 1.21 2005/11/26 14:42:10 c95men Exp $
Author:
Markus Eriksson

Field Summary
protected  SmsUserData myUd
           
protected  SmsUdhElement[] myUdhElements
           
 
Constructor Summary
SmsPdu()
          Creates an empty SMS pdu object
SmsPdu(SmsUdhElement[] theUdhIeis, byte[] theUd, int theUdLength, SmsDcs theDataCodingScheme)
          Creates an SMS pdu object.
SmsPdu(SmsUdhElement[] theUdhIeis, SmsUserData theUd)
          Creates an SMS pdu object.
 
Method Summary
 SmsDcs getDcs()
          Returns the dcs.
 SmsUserData getUserData()
          Returns the user data part of the message.
 byte[] getUserDataHeaders()
          Returns the user data headers
 void setUserData(byte[] theUd, int theUdLength, SmsDcs theDataCodingScheme)
          Sets the user data field of the message.
 void setUserData(SmsUserData theUd)
          Sets the user data field of the message.
 void setUserDataHeaders(SmsUdhElement[] theUdhElements)
          Sets the UDH field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myUdhElements

protected SmsUdhElement[] myUdhElements

myUd

protected SmsUserData myUd
Constructor Detail

SmsPdu

public SmsPdu()
Creates an empty SMS pdu object


SmsPdu

public SmsPdu(SmsUdhElement[] theUdhIeis,
              byte[] theUd,
              int theUdLength,
              SmsDcs theDataCodingScheme)
Creates an SMS pdu object.

Parameters:
theUdhIeis - The UDH elements
theUd - The content
theUdLength - The length of the content. Can be in octets or septets depending on the DCS

SmsPdu

public SmsPdu(SmsUdhElement[] theUdhIeis,
              SmsUserData theUd)
Creates an SMS pdu object.

Parameters:
theUdhIeis - The UDH elements
theUd - The content
Method Detail

setUserDataHeaders

public void setUserDataHeaders(SmsUdhElement[] theUdhElements)
Sets the UDH field

Parameters:
theUdhElements - The UDH elements

getUserDataHeaders

public byte[] getUserDataHeaders()
Returns the user data headers

Returns:
A byte array representing the UDH fields or null if there aren't any UDH

setUserData

public void setUserData(byte[] theUd,
                        int theUdLength,
                        SmsDcs theDataCodingScheme)
Sets the user data field of the message.

Parameters:
theUd - The content
theUdLength - The length, can be in septets or octets depending on the DCS
theDataCodingScheme - The data coding scheme

setUserData

public void setUserData(SmsUserData theUd)
Sets the user data field of the message.

Parameters:
theUd - The content

getUserData

public SmsUserData getUserData()
Returns the user data part of the message.

Returns:
UD field

getDcs

public SmsDcs getDcs()
Returns the dcs.

Returns:
dcs


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