net.sf.fmj.media.rtp
Class RTPPacket

java.lang.Object
  extended by net.sf.fmj.media.rtp.RTPPacket

public class RTPPacket
extends java.lang.Object

Represents an RTP Packet

Version:
1-1-alpha
Author:
Andrew G D Rowley, Christian Vincenot

Constructor Summary
RTPPacket(byte[] data, int offset, int length)
          Creates a new RTPPacket
RTPPacket(java.net.DatagramPacket packet)
          Creates a new RTPPacket
 
Method Summary
 byte[] getRtpData()
          Returns the data contained in this packet.
 RTPHeader getRtpHeader()
          Returns the RTP Header of this packet.
 int getRtpLength()
          Returns the length of this packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTPPacket

public RTPPacket(java.net.DatagramPacket packet)
          throws java.io.IOException
Creates a new RTPPacket

Parameters:
packet - The datagram to get the packet from
Throws:
java.io.IOException - I/O Exception

RTPPacket

public RTPPacket(byte[] data,
                 int offset,
                 int length)
          throws java.io.IOException
Creates a new RTPPacket

Parameters:
offset - the offset after which the RTP packet starts
length - the total length
data - The datagram to get the packet from
Throws:
java.io.IOException - I/O Exception
Method Detail

getRtpHeader

public RTPHeader getRtpHeader()
Returns the RTP Header of this packet.

Returns:
The header of the packet

getRtpData

public byte[] getRtpData()
Returns the data contained in this packet.

Returns:
The packet data

getRtpLength

public int getRtpLength()
Returns the length of this packet.

Returns:
The length of the data