/** * @class Ext.data.amf.Packet * This class represents an Action Message Format (AMF) Packet. It contains all * the logic required to decode an AMF Packet from a byte array. * To decode a Packet, first construct a Packet: * * var packet = Ext.create('Ext.data.amf.Packet'); * * Then use the decode method to decode an AMF byte array: * * packet.decode(bytes); * * where "bytes" is a Uint8Array or an array of numbers representing the binary * AMF data. * * To access the decoded data use the #version, #headers, and #messages properties: * * console.log(packet.version, packet.headers, packet.messages); * * For more information on working with AMF data please refer to the * [AMF Guide](../guides/backend_connectors/amf.html). */ /** * @property {Array} headers * @readonly * The decoded headers. Each header has the following properties: * * - `name`: String * The header name. Typically identifies a remote operation or method to * be invoked by this context header. * - `mustUnderstand`: Boolean * If `true` this flag instructs the endpoint to abort and generate an * error if the header is not understood. * - `byteLength`: Number * If the byte-length of a header is known it can be specified to optimize * memory allocation at the remote endpoint. * - `value`: Mixed * The header value */ /** * @property {Array} messages * @readonly * The decoded messages. Each message has the following properties: * * - `targetURI`: String * Describes which operation, function, or method is to be remotely * invoked. * - `responseURI`: String * A unique operation name * - `byteLength`: Number * Optional byte-length of the message body * - `body`: Mixed * The message body */ /** * @property {Number} version * @readonly * The AMF version number (0 or 3) */