public class AMFObj
extends Object
AMFObj: class that stores the state of channel between the client and the server.
| Modifier and Type | Field | Description |
|---|---|---|
static boolean |
AMFDEBUGHEADERSIZE |
|
static boolean |
WOWZDEBUGHEADERSIZE |
| Constructor | Description |
|---|---|
AMFObj(int id) |
Create new AMFObj for a given channel (id)
|
AMFObj(int id,
int objectEncoding) |
Create new AMFObj for a given channel (id)
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addChunk(byte[] buffer,
int offset,
int len) |
Add a chunk to the chunk list
|
void |
clearByteContainer() |
Clear the byte container
|
long |
getAbsTimecode() |
Get the absolute time code
|
int |
getByteContainerLevel() |
Fake container for processing
|
long |
getChunkCounter() |
|
java.util.List<AMFObjChunk> |
getChunks() |
Get the chunks that make up this packet
|
int |
getId() |
Get channel id
|
int |
getObjectEncoding() |
|
long |
getSentAbsTimecode() |
|
int |
getSize() |
Get packet size
|
int |
getSrc() |
Get stream id (0 if not stream data)
|
long |
getTimecode() |
Get timecode (milliseconds) sometimes relative
|
int |
getType() |
Get content type IVHost.CONTENTTYPE_*
|
long |
incAbsTimecode(long absTimecode) |
Increment the absolution timecode
|
void |
incByteContainerLevel(int byteContainerLevel) |
Fake container for processing
|
boolean |
isByteContainerEmpty() |
Fake container for processing
|
boolean |
isByteContainerFull() |
Fake container for processing
|
boolean |
isLastSentAbsTimecode() |
|
boolean |
isLongTimecode() |
Get is a 32 bit timecode
|
boolean |
isNew() |
Is this a new packet.
|
boolean |
isObjectEncodingAMF0() |
|
boolean |
isObjectEncodingAMF3() |
|
long |
setAbsTimecodeLong(long absTimecode) |
Set the absolute timecode
|
long |
setAbsTimecodeShort(long absTimecode) |
Set the absolute timecode
|
void |
setByteContainerLevel(int byteContainerLevel) |
Fake container for processing
|
void |
setChunkCounter(long chunkCounter) |
|
void |
setId(int id) |
Set channel id
|
void |
setLastSentAbsTimecode(boolean isLastSentAbsTimecode) |
|
void |
setLongTimecode(boolean isLongTimecode) |
Set is a 32 bit timecode
|
void |
setNew(boolean isNew) |
Set is new packet
|
void |
setObjectEncoding(int objectEncoding) |
|
void |
setSentAbsTimecode(long sentAbsTimecode) |
|
void |
setSize(int size) |
Set packet size
|
void |
setSrc(int src) |
Set stream id (0 if not stream data)
|
void |
setTimecode(long timecode) |
Set timecode (milliseconds) sometimes relative
|
void |
setType(int type) |
Set content type IVHost.CONTENTTYPE_*
|
String |
toString() |
Return object as formatted string
|
public static final boolean AMFDEBUGHEADERSIZE
public static final boolean WOWZDEBUGHEADERSIZE
public AMFObj(int id)
id - channel idpublic AMFObj(int id,
int objectEncoding)
id - channel idobjectEncoding - object encoding level (AMF0 or AMF3)public void addChunk(byte[] buffer,
int offset,
int len)
buffer - bufferoffset - offsetlen - lengthpublic void clearByteContainer()
public long getAbsTimecode()
public int getByteContainerLevel()
public long getChunkCounter()
public java.util.List<AMFObjChunk> getChunks()
public int getId()
public int getObjectEncoding()
public long getSentAbsTimecode()
public int getSize()
public int getSrc()
public long getTimecode()
public int getType()
public long incAbsTimecode(long absTimecode)
absTimecode - absolute timecodepublic void incByteContainerLevel(int byteContainerLevel)
byteContainerLevel - current container levelpublic boolean isByteContainerEmpty()
public boolean isByteContainerFull()
public boolean isLastSentAbsTimecode()
public boolean isLongTimecode()
public boolean isNew()
public boolean isObjectEncodingAMF0()
public boolean isObjectEncodingAMF3()
public long setAbsTimecodeLong(long absTimecode)
absTimecode - absolute timecodepublic long setAbsTimecodeShort(long absTimecode)
absTimecode - public void setByteContainerLevel(int byteContainerLevel)
byteContainerLevel - current container levelpublic void setChunkCounter(long chunkCounter)
public void setId(int id)
id - channel idpublic void setLastSentAbsTimecode(boolean isLastSentAbsTimecode)
public void setLongTimecode(boolean isLongTimecode)
isLongTimecode - is a 32 bit timecodepublic void setNew(boolean isNew)
isNew - is new packetpublic void setObjectEncoding(int objectEncoding)
public void setSentAbsTimecode(long sentAbsTimecode)
public void setSize(int size)
size - packet sizepublic void setSrc(int src)
src - stream idpublic void setTimecode(long timecode)
timecode - timecode (milliseconds)public void setType(int type)
type - content typepublic String toString()
toString in class Object