Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit

ie.ncl.sms.gsm
Class IE

java.lang.Object
  extended by ie.ncl.sms.gsm.IE
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
CommandPacket, Fragmentation, Ports

public class IE
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

An InformationElement is an atomic component of the header in a short message when the user data header indicator is set. An information element contains a unique id to indicate the data type it contains (eg message concatenation id indicates that a sequence number, fragmentation count and the current fragment are all to follow) and the data itself.

This object does not contain the structure of each InformationElement type. That is left to the subclasses of this object.

A sequence of IEs can be added to a UserDataHeader object which inturn is added to a user data header message. Each (subclassed) IE can appear in the user data header of every fragment or just the first fragment. This is specified by setOnlyInFirstFragment. Also, the order in which IE's are encoded is not specified in the GSM protocol but some handsets may require the fragmentation for example as the first IE. The order can be specified using the setPreferredEncodingOrder. By default the order is set to 0xFF for each IE (fragmentation IEs set this to 0 to ensure that it is the first IE encoded in bytes).

See Also:
UserDataHeader, Serialized Form

Field Summary
static int IEI_COMMAND_PACKET
           
static int IEI_LONG_PORT_ADDRESS
           
static int IEI_MESSAGE_CONCATENATION
           
static int IEI_MESSAGE_CONCATENATION_16BIT
           
static int IEI_RESERVED
           
static int IEI_RESERVED_LINEFEED
           
static int IEI_SHORT_PORT_ADDRESS
           
static int IEI_SMSC_CONTROL_PARAMETERS
           
static int IEI_SPECIAL_MESSAGE_INDICATION
           
static int IEI_UDH_SOURCE_INDICATOR
           
 
Constructor Summary
IE(int id, byte[] data)
          Construct and InformationElement that will be used in the header of a user data header message.
IE(java.lang.String id, byte[] data)
          Construct and InformationElement that will be used in the header of a user data header message.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 byte[] getData()
          Get the data for this Information Element.
 int getId()
          Get the Information Element Identity (IEI) or just id of this IE.
 int getId(java.lang.String id)
          gets the integer coding for the id string from the file ie/ncl/sms/gsm/IE.properties.
 int getOctetLength()
          Get the data octet length.
 int getPreferredEncodingOrder()
           
 boolean isOnlyInFirstFragment()
           
 void setOnlyInFirstFragment(boolean onlyInFirstFragment)
           
 void setPreferredEncodingOrder(int preferredEncodingOrder)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IEI_MESSAGE_CONCATENATION

public static final int IEI_MESSAGE_CONCATENATION
See Also:
Constant Field Values

IEI_SPECIAL_MESSAGE_INDICATION

public static final int IEI_SPECIAL_MESSAGE_INDICATION
See Also:
Constant Field Values

IEI_RESERVED

public static final int IEI_RESERVED
See Also:
Constant Field Values

IEI_RESERVED_LINEFEED

public static final int IEI_RESERVED_LINEFEED
See Also:
Constant Field Values

IEI_SHORT_PORT_ADDRESS

public static final int IEI_SHORT_PORT_ADDRESS
See Also:
Constant Field Values

IEI_LONG_PORT_ADDRESS

public static final int IEI_LONG_PORT_ADDRESS
See Also:
Constant Field Values

IEI_SMSC_CONTROL_PARAMETERS

public static final int IEI_SMSC_CONTROL_PARAMETERS
See Also:
Constant Field Values

IEI_UDH_SOURCE_INDICATOR

public static final int IEI_UDH_SOURCE_INDICATOR
See Also:
Constant Field Values

IEI_MESSAGE_CONCATENATION_16BIT

public static final int IEI_MESSAGE_CONCATENATION_16BIT
See Also:
Constant Field Values

IEI_COMMAND_PACKET

public static final int IEI_COMMAND_PACKET
See Also:
Constant Field Values
Constructor Detail

IE

public IE(int id,
          byte[] data)
Construct and InformationElement that will be used in the header of a user data header message.

See Also:
UserDataHeader

IE

public IE(java.lang.String id,
          byte[] data)
   throws java.lang.Exception
Construct and InformationElement that will be used in the header of a user data header message.

Parameters:
id - an key in the properties file ie/ncl/sms/gsm/IE.properties
data - the data for this IE.
Throws:
java.lang.Exception
See Also:
UserDataHeader
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

getId

public int getId(java.lang.String id)
          throws java.lang.Exception
gets the integer coding for the id string from the file ie/ncl/sms/gsm/IE.properties.

Throws:
java.lang.Exception

getId

public int getId()
Get the Information Element Identity (IEI) or just id of this IE.


getData

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


getOctetLength

public int getOctetLength()
Get the data octet length.


isOnlyInFirstFragment

public boolean isOnlyInFirstFragment()

setOnlyInFirstFragment

public void setOnlyInFirstFragment(boolean onlyInFirstFragment)

getPreferredEncodingOrder

public int getPreferredEncodingOrder()

setPreferredEncodingOrder

public void setPreferredEncodingOrder(int preferredEncodingOrder)

toString

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

Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit