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 UDHMessage

java.lang.Object
  extended by ie.ncl.msg.Message
      extended by ie.ncl.msg.BinaryMessage
          extended by ie.ncl.sms.gsm.UDHMessage
All Implemented Interfaces:
java.io.Serializable

public class UDHMessage
extends BinaryMessage

A User Data Header Message is a message with a set of indicators at the start of the message such as fragmentation information, source and destination port numbers.

See Also:
Serialized Form

Constructor Summary
UDHMessage(Address destination, byte[] bytes, UserDataHeader udh)
          Create a User Data Header Message specifying the destination address, the header and the data.
UDHMessage(BinaryMessage msg, byte[] bytes, UserDataHeader udh)
          Create a User Data Header Message specifying the all the message attributes from another message, and also the header and the data.
 
Method Summary
static BinaryMessage[] fragment(Message msg, int maxLen, int sequence)
           
static BinaryMessage[] fragment(Message msg, int maxLen, int sequence, java.lang.String charEncoding)
           
static UDHMessage fromSMS(BinaryMessage sms)
          Construct a UDHMessage from a simple SMS message.
 Fragmentation getFragmentation()
          Short cut to getting the fragmentation information in the header.
 Ports getPorts()
          Short cut to getting the port addressing information in the header.
 UserDataHeader getUserDataHeader()
          Get the header of the message.
static int roundUpToBlockSize(int dataLength, int blockSize)
           
 void setUserDataHeader(UserDataHeader udh)
          Set the header of the message.
 
Methods inherited from class ie.ncl.msg.BinaryMessage
getBody, getBytes, setBody, setBytes, size
 
Methods inherited from class ie.ncl.msg.Message
getAttribute, getAttributes, getCorrelationID, getDestination, getID, getSource, getType, putAttribute, removeAttribute, setAttributes, setCorrelationID, setDestination, setID, setSource, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDHMessage

public UDHMessage(Address destination,
                  byte[] bytes,
                  UserDataHeader udh)
Create a User Data Header Message specifying the destination address, the header and the data.


UDHMessage

public UDHMessage(BinaryMessage msg,
                  byte[] bytes,
                  UserDataHeader udh)
Create a User Data Header Message specifying the all the message attributes from another message, and also the header and the data.

Method Detail

getUserDataHeader

public UserDataHeader getUserDataHeader()
Get the header of the message.


setUserDataHeader

public void setUserDataHeader(UserDataHeader udh)
Set the header of the message.


getPorts

public Ports getPorts()
Short cut to getting the port addressing information in the header.


getFragmentation

public Fragmentation getFragmentation()
Short cut to getting the fragmentation information in the header.


fragment

public static BinaryMessage[] fragment(Message msg,
                                       int maxLen,
                                       int sequence)

fragment

public static BinaryMessage[] fragment(Message msg,
                                       int maxLen,
                                       int sequence,
                                       java.lang.String charEncoding)
                                throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

roundUpToBlockSize

public static int roundUpToBlockSize(int dataLength,
                                     int blockSize)

fromSMS

public static UDHMessage fromSMS(BinaryMessage sms)
                          throws UserDataHeaderMalformedException
Construct a UDHMessage from a simple SMS message.

Throws:
UserDataHeaderMalformedException

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