|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ie.ncl.sms.gsm.IE
public class IE
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).
UserDataHeader
,
Serialized FormField 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 |
---|
public static final int IEI_MESSAGE_CONCATENATION
public static final int IEI_SPECIAL_MESSAGE_INDICATION
public static final int IEI_RESERVED
public static final int IEI_RESERVED_LINEFEED
public static final int IEI_SHORT_PORT_ADDRESS
public static final int IEI_LONG_PORT_ADDRESS
public static final int IEI_SMSC_CONTROL_PARAMETERS
public static final int IEI_UDH_SOURCE_INDICATOR
public static final int IEI_MESSAGE_CONCATENATION_16BIT
public static final int IEI_COMMAND_PACKET
Constructor Detail |
---|
public IE(int id, byte[] data)
UserDataHeader
public IE(java.lang.String id, byte[] data) throws java.lang.Exception
id
- an key in the properties file ie/ncl/sms/gsm/IE.propertiesdata
- the data for this IE.
java.lang.Exception
UserDataHeader
Method Detail |
---|
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int getId(java.lang.String id) throws java.lang.Exception
id
string from the file
ie/ncl/sms/gsm/IE.properties.
java.lang.Exception
public int getId()
public byte[] getData()
public int getOctetLength()
public boolean isOnlyInFirstFragment()
public void setOnlyInFirstFragment(boolean onlyInFirstFragment)
public int getPreferredEncodingOrder()
public void setPreferredEncodingOrder(int preferredEncodingOrder)
public java.lang.String toString()
toString
in class java.lang.Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |