de.humatic.dsj.src.rtmp
Class RTMPMessage

java.lang.Object
  extended by de.humatic.dsj.src.rtmp.RTMPMessage

public class RTMPMessage
extends java.lang.Object


Constructor Summary
RTMPMessage(int messageType, AMFType[] values)
          Creates an RTMP packet with the given RTMP type and the supplied arguments on AMF channel 3, stream nr.
RTMPMessage(int channel, int stream, int messageType, AMFType[] values)
          Creates an RTMP packet on the given AMF channel number (lower 5 bits of first headerbyte) and with the given streamnumber in the last 4 header bytes.
RTMPMessage(int channel, int stream, int messageType, AMFType[] values, int chunkSize)
          Creates an RTMP packet on the given AMF channel number (lower 5 bits of first headerbyte) and with the given streamnumber in the last 4 header bytes, overwriting the default 128 byte chunk size.
 
Method Summary
 byte[] toByteArray()
          Serializes the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTMPMessage

public RTMPMessage(int messageType,
                   AMFType[] values)
Creates an RTMP packet with the given RTMP type and the supplied arguments on AMF channel 3, stream nr. 0.


RTMPMessage

public RTMPMessage(int channel,
                   int stream,
                   int messageType,
                   AMFType[] values)
Creates an RTMP packet on the given AMF channel number (lower 5 bits of first headerbyte) and with the given streamnumber in the last 4 header bytes.


RTMPMessage

public RTMPMessage(int channel,
                   int stream,
                   int messageType,
                   AMFType[] values,
                   int chunkSize)
Creates an RTMP packet on the given AMF channel number (lower 5 bits of first headerbyte) and with the given streamnumber in the last 4 header bytes, overwriting the default 128 byte chunk size.

Method Detail

toByteArray

public byte[] toByteArray()
Serializes the message. If its length exceedes the default or explicitely given chunk size the returned byte[] will contain chunk headers.