public class AMFDataByteArray extends AMFData
AMFDataByteArray: class for marshalling data between Wowza Pro server and Flash client. This class is a simple byte array.
AMF_DEFAULT_DESERIALIZE_CHARSETNAME, AMF_LEVEL0, AMF_LEVEL3, DATA_TYPE_AMF3, DATA_TYPE_AMF3_ARRAY, DATA_TYPE_AMF3_BOOLEAN_FALSE, DATA_TYPE_AMF3_BOOLEAN_TRUE, DATA_TYPE_AMF3_BYTEARRAY, DATA_TYPE_AMF3_DATE, DATA_TYPE_AMF3_INTEGER, DATA_TYPE_AMF3_NULL, DATA_TYPE_AMF3_NUMBER, DATA_TYPE_AMF3_OBJECT, DATA_TYPE_AMF3_STRING, DATA_TYPE_AMF3_UNDEFINED, DATA_TYPE_AMF3_XML_LEGACY, DATA_TYPE_AMF3_XML_TOP, DATA_TYPE_ARRAY, DATA_TYPE_AS_OBJECT, DATA_TYPE_BOOLEAN, DATA_TYPE_BYTEARRAY, DATA_TYPE_CUSTOM_CLASS, DATA_TYPE_DATE, DATA_TYPE_INTEGER, DATA_TYPE_LONG_STRING, DATA_TYPE_MIXED_ARRAY, DATA_TYPE_MOVIE_CLIP, DATA_TYPE_NULL, DATA_TYPE_NUMBER, DATA_TYPE_OBJECT, DATA_TYPE_OBJECT_END, DATA_TYPE_RECORDSET, DATA_TYPE_REFERENCE_OBJECT, DATA_TYPE_STRING, DATA_TYPE_UNDEFINED, DATA_TYPE_UNKNOWN, DATA_TYPE_XML, DATA_TYPE_XML_TOP, MILLS_PER_HOUR, type| Constructor and Description |
|---|
AMFDataByteArray()
Create empty AMFDataByteArray object
|
AMFDataByteArray(byte[] data)
Deserialize entire byte array and create AMFDataByteArray object.
|
AMFDataByteArray(byte[] data,
int offset,
int size)
Deserialize data array starting at offest for size bytes and create AMFDataByteArray object.
|
AMFDataByteArray(java.nio.ByteBuffer data)
Deserialize entire data array and create AMFDataByteArray object.
|
AMFDataByteArray(java.nio.ByteBuffer data,
AMFDataContextDeserialize context)
Deserialize entire data array and create AMFDataByteArray object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compress()
Compress the internal buffer using the ZLIB compression library
|
int |
decompress()
Decompress the internal buffer using the ZLIB compression library
|
void |
deserialize(java.nio.ByteBuffer data)
Deserialize data in byte buffer
|
void |
deserialize(java.nio.ByteBuffer data,
AMFDataContextDeserialize context)
Deserialize data in byte buffer
|
Object |
getValue()
Returns the underlying byte[] data buffer
|
byte[] |
serialize()
Serial object to byte array
|
byte[] |
serialize(AMFDataContextSerialize context)
Serial object to byte array
|
void |
serialize(java.io.DataOutputStream out)
Serialize object to output stream
|
void |
serialize(java.io.DataOutputStream out,
AMFDataContextSerialize context)
Serialize object to output stream
|
void |
serialize(java.io.DataOutputStream out,
int objectEncoding)
Serialize object to output stream
|
byte[] |
serialize(int objectEncoding)
Serial object to byte array
|
int |
size()
Returns the number of bytes in the byte array
|
byte[] |
toArray()
Returns the underlying data buffer (not a copy)
|
java.nio.ByteBuffer |
toByteBuffer()
Wraps the underlying data buffer with a ByteBuffer object.
|
String |
toString()
Return object as formatted string
|
static AMFDataByteArray |
wrap(byte[] data)
Wraps a byte[] into a AMFDataByteArray.
|
static AMFDataByteArray |
wrap(java.nio.ByteBuffer data)
Wraps a ByteBuffer into a AMFDataByteArray.
|
createContextDeserialize, createContextDeserialize, createContextSerialize, createContextSerialize, deserializeInnerObject, getReference, getType, isAMF3Start, isArrayStart, isByteArrayStart, isMixedArrayStart, isObjEnd, isObjStart, peekByte, setType, skipByte, testNextByte, triggerAMF3Switchpublic AMFDataByteArray()
public AMFDataByteArray(byte[] data)
data - binary datapublic AMFDataByteArray(byte[] data,
int offset,
int size)
data - binary dataoffset - starting offset into datasize - size of data to deserializepublic AMFDataByteArray(java.nio.ByteBuffer data)
data - binary datapublic AMFDataByteArray(java.nio.ByteBuffer data,
AMFDataContextDeserialize context)
data - binary datacontext - deserialization context (used for AMF3 decoding)public int compress()
public int decompress()
public void deserialize(java.nio.ByteBuffer data)
AMFDatadeserialize in class AMFDatadata - binary datapublic void deserialize(java.nio.ByteBuffer data,
AMFDataContextDeserialize context)
AMFDatadeserialize in class AMFDatadata - binary datacontext - deserialization context used by AMF3public Object getValue()
public byte[] serialize()
AMFDatapublic byte[] serialize(AMFDataContextSerialize context)
AMFDatapublic void serialize(java.io.DataOutputStream out)
AMFDatapublic void serialize(java.io.DataOutputStream out,
AMFDataContextSerialize context)
AMFDatapublic void serialize(java.io.DataOutputStream out,
int objectEncoding)
AMFDatapublic byte[] serialize(int objectEncoding)
AMFDatapublic int size()
public byte[] toArray()
public java.nio.ByteBuffer toByteBuffer()
public String toString()
toString in class Objectpublic static AMFDataByteArray wrap(byte[] data)
data - byte[] datapublic static AMFDataByteArray wrap(java.nio.ByteBuffer data)
data - ByteBuffer data