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 UserDataHeader

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by ie.ncl.sms.gsm.UserDataHeader
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class UserDataHeader
extends java.util.Vector
implements java.io.Serializable

The user data header object is used to group Information Elements (IEs) together which then form the (optional) header of a short message (UDHMessage). When a UserDataHeader message is used, the user data header indicator (UDHI) must be set in the short message.

See Also:
IE, Ports, Fragmentation, UDHMessage, Serialized Form

Constructor Summary
UserDataHeader()
          Creates and empty user data header.
UserDataHeader(byte[] bytes)
          Convert bytes to array of information elements.
UserDataHeader(UserDataHeader toCopy)
           
UserDataHeader(UserDataHeader toCopy, boolean firstFragment)
           
 
Method Summary
 void add(IE ie)
          Add an Information Element.
 IE find(int type)
          Find a particular information element specifying the information element identifier (IEI).
 Fragmentation getFragmentation()
          Finding the Fragmentation IE.
 IE getIE(int i)
          Get the nth Information Element in this header.
 int getLength()
           
 int getLength(boolean firstFragment)
           
 Ports getPorts()
          Finding the Ports (long or short versions).
 byte[] toBytes()
           
 byte[] toBytes(boolean firstFragment)
          Convert the information elements to a byte array.
 byte[] toCdmaBytes()
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

UserDataHeader

public UserDataHeader()
Creates and empty user data header.


UserDataHeader

public UserDataHeader(byte[] bytes)
               throws UserDataHeaderMalformedException
Convert bytes to array of information elements.

Throws:
UserDataHeaderMalformedException

UserDataHeader

public UserDataHeader(UserDataHeader toCopy,
                      boolean firstFragment)

UserDataHeader

public UserDataHeader(UserDataHeader toCopy)
Method Detail

add

public void add(IE ie)
Add an Information Element.

See Also:
IE, Ports, Fragmentation

getIE

public IE getIE(int i)
Get the nth Information Element in this header.


find

public IE find(int type)
Find a particular information element specifying the information element identifier (IEI).

See Also:
IE.IEI_MESSAGE_CONCATENATION, IE.IEI_SPECIAL_MESSAGE_INDICATION, IE.IEI_SHORT_PORT_ADDRESS, IE.IEI_LONG_PORT_ADDRESS, IE.IEI_SMSC_CONTROL_PARAMETERS, IE.IEI_UDH_SOURCE_INDICATOR

getPorts

public Ports getPorts()
Finding the Ports (long or short versions).

See Also:
Ports

getFragmentation

public Fragmentation getFragmentation()
Finding the Fragmentation IE.

See Also:
Fragmentation

getLength

public int getLength(boolean firstFragment)

getLength

public int getLength()

toBytes

public byte[] toBytes()

toBytes

public byte[] toBytes(boolean firstFragment)
Convert the information elements to a byte array.


toCdmaBytes

public byte[] toCdmaBytes()
                   throws ie.ncl.net.pdu.EncoderException
Throws:
ie.ncl.net.pdu.EncoderException

toString

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

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