com.objectxp.msg.util
Class SmsHeaderElement

java.lang.Object
  extended by com.objectxp.msg.util.SmsHeaderElement
Direct Known Subclasses:
ConcatHeaderElement, PortAddressingHeaderElement

public class SmsHeaderElement
extends java.lang.Object

This class represents a SMS UDH (User Data Header) element. See GSM 03.40 for more information about the UDH.

See Also:
SmsHeader

Field Summary
static int APPL_PORT_ADDR_16_BIT
          Element ID: Applicatoin Port Addressing, 16 bit port number
static int APPL_PORT_ADDR_8_BIT
          Element ID: Application Port Addressing, 8bit port number
static int CONCAT_SM_16BIT_REF
          Element ID: Concatenated Short Message, 16bit reference number
static int CONCAT_SM_8BIT_REF
          Element ID: Concatenated Short Message, 8bit reference number
static int EMS_LARGE_ANIM
          Element ID: EMS large animation
static int EMS_LARGE_PICTURE
          Element ID: EMS large picture
static int EMS_PREDEF_ANIM
          Element ID: EMS predefined animation
static int EMS_PREDEF_SOUND
          Element ID: EMS predefined sound
static int EMS_PROMPT_INDICATOR
          Element ID: EMS User Prompt Indicator
static int EMS_SMALL_ANIM
          Element ID: EMS small animation
static int EMS_SMALL_PICTURE
          Element ID: EMS small picture
static int EMS_TEXT_FMT
          Element ID: EMS text format
static int EMS_USERDEF_SOUND
          Element ID: EMS user-defined sound
static int EMS_VARIABLE_PICTURE
          Element ID: EMS variable picture
static int SMSC_CONTROL_PARAMS
          Element ID: SMSC Control Parameters
static int SPECIAL_SMS_INDICATION
          Element ID: Special SMS Indication
static int UDH_SRC_INDICATION
          Element ID: UDH Source indicator
static int WCMP
          Element ID: Wireless Control Message Protocol
 
Constructor Summary
SmsHeaderElement(int elementID, byte[] data)
          Construct a new UDH Element.
 
Method Summary
 byte[] getBytes()
          Get the binary representation of the Header Element.
 byte[] getData()
          Get the Element data.
 int getID()
          Get the ID of this Header Element.
 int getLength()
          Get the length of the Element data.
 void setData(byte[] data)
          Set the data for this Header Element.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONCAT_SM_8BIT_REF

public static final int CONCAT_SM_8BIT_REF
Element ID: Concatenated Short Message, 8bit reference number

See Also:
Constant Field Values

SPECIAL_SMS_INDICATION

public static final int SPECIAL_SMS_INDICATION
Element ID: Special SMS Indication

See Also:
Constant Field Values

APPL_PORT_ADDR_8_BIT

public static final int APPL_PORT_ADDR_8_BIT
Element ID: Application Port Addressing, 8bit port number

See Also:
Constant Field Values

APPL_PORT_ADDR_16_BIT

public static final int APPL_PORT_ADDR_16_BIT
Element ID: Applicatoin Port Addressing, 16 bit port number

See Also:
Constant Field Values

SMSC_CONTROL_PARAMS

public static final int SMSC_CONTROL_PARAMS
Element ID: SMSC Control Parameters

See Also:
Constant Field Values

UDH_SRC_INDICATION

public static final int UDH_SRC_INDICATION
Element ID: UDH Source indicator

See Also:
Constant Field Values

CONCAT_SM_16BIT_REF

public static final int CONCAT_SM_16BIT_REF
Element ID: Concatenated Short Message, 16bit reference number

See Also:
Constant Field Values

WCMP

public static final int WCMP
Element ID: Wireless Control Message Protocol

See Also:
Constant Field Values

EMS_TEXT_FMT

public static final int EMS_TEXT_FMT
Element ID: EMS text format

See Also:
Constant Field Values

EMS_PREDEF_SOUND

public static final int EMS_PREDEF_SOUND
Element ID: EMS predefined sound

See Also:
Constant Field Values

EMS_USERDEF_SOUND

public static final int EMS_USERDEF_SOUND
Element ID: EMS user-defined sound

See Also:
Constant Field Values

EMS_PREDEF_ANIM

public static final int EMS_PREDEF_ANIM
Element ID: EMS predefined animation

See Also:
Constant Field Values

EMS_LARGE_ANIM

public static final int EMS_LARGE_ANIM
Element ID: EMS large animation

See Also:
Constant Field Values

EMS_SMALL_ANIM

public static final int EMS_SMALL_ANIM
Element ID: EMS small animation

See Also:
Constant Field Values

EMS_LARGE_PICTURE

public static final int EMS_LARGE_PICTURE
Element ID: EMS large picture

See Also:
Constant Field Values

EMS_SMALL_PICTURE

public static final int EMS_SMALL_PICTURE
Element ID: EMS small picture

See Also:
Constant Field Values

EMS_VARIABLE_PICTURE

public static final int EMS_VARIABLE_PICTURE
Element ID: EMS variable picture

See Also:
Constant Field Values

EMS_PROMPT_INDICATOR

public static final int EMS_PROMPT_INDICATOR
Element ID: EMS User Prompt Indicator

See Also:
Constant Field Values
Constructor Detail

SmsHeaderElement

public SmsHeaderElement(int elementID,
                        byte[] data)
Construct a new UDH Element.

Parameters:
elementID - the Element ID
data - the Element data
Method Detail

getID

public int getID()
Get the ID of this Header Element.

Returns:
the Element Identifier

setData

public void setData(byte[] data)
Set the data for this Header Element.

Parameters:
data - Element data

getData

public byte[] getData()
Get the Element data.

Returns:
the element data

getLength

public int getLength()
Get the length of the Element data.

Returns:
the element data or 0 if no data is present.

getBytes

public byte[] getBytes()
Get the binary representation of the Header Element. The first two bytes of the byte array returned consists of the element ID (first byte), the length of the data (data length + 2) followed by the element data itself.

Returns:
the Element data

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


object XP, Inc. © 2000-2008. All rights reserved object XP