org.marre.sms
Class SmsUdhElement

java.lang.Object
  extended byorg.marre.sms.SmsUdhElement

public class SmsUdhElement
extends java.lang.Object

Represents an User Data Header Element

Version:
$Id: SmsUdhElement.java,v 1.5 2004/11/02 17:59:49 c95men Exp $
Author:
Markus Eriksson

Field Summary
protected  int myUdhIei
           
protected  byte[] myUdhIeiData
           
 
Constructor Summary
SmsUdhElement(int theUdhIei, byte[] theUdhIeiData)
          Creates an SmsUdhElement
 
Method Summary
 byte[] getData()
          Return the UDH element including the UDH "header" (two bytes)
 int getTotalSize()
          Returns the total length of this UDH element.
 byte[] getUdhIeiData()
          Returns the Udh Iei Data excluding the UDH "header"
 int getUdhIeiDataLength()
          Returns the length of the UDH iei data The length returned is only the length of the data
 void writeTo(java.io.OutputStream os)
          Writes the UDH element including UDH "header" to the given stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myUdhIei

protected int myUdhIei

myUdhIeiData

protected byte[] myUdhIeiData
Constructor Detail

SmsUdhElement

public SmsUdhElement(int theUdhIei,
                     byte[] theUdhIeiData)
Creates an SmsUdhElement

Parameters:
theUdhIei -
theUdhIeiData -
Method Detail

getTotalSize

public int getTotalSize()
Returns the total length of this UDH element.

The length is including the UDH data length and the UDH "header" (2 bytes)

Returns:
the length

getUdhIeiDataLength

public int getUdhIeiDataLength()
Returns the length of the UDH iei data

The length returned is only the length of the data

Returns:
Length of data

getUdhIeiData

public byte[] getUdhIeiData()
Returns the Udh Iei Data excluding the UDH "header"

Returns:
Data

getData

public byte[] getData()
Return the UDH element including the UDH "header" (two bytes)

Returns:
Data

writeTo

public void writeTo(java.io.OutputStream os)
             throws java.io.IOException
Writes the UDH element including UDH "header" to the given stream

Parameters:
os - Stream to write to
Throws:
java.io.IOException


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.