Write raw AMF data from a ByteArray.

var myData = {myString: "hello", myFloat: 123.4};
var writer = new AMFWriter(byteArray);
writer.writeObject(data);

Constructor

new(targetReference:ByteArray)

Creates a new AMFReader instance with the given arguments.

Variables

@:flash.propertyendian:Endian

@:value(AMF3)objectEncoding:ObjectEncoding = AMF3

Methods

reset():Void

Resets the reader to forget any saved objects, strings, traits, or switching status between AMF0 and AMF3.

writeBoolean(value:Bool):Void

writeByte(byte:Int):Void

@:value({ length : 0, offset : 0 })writeBytes(bytes:ByteArray, offset:UInt = 0, length:UInt = 0):Void

writeDouble(val:Float):Void

writeDynamicProperty(name:String, value:Dynamic):Void

This serialization context is passed as the 2nd parameter to an IDynamicPropertyWriter implementation's writeDynamicProperties method call. The resolved properties are written here

Parameters:

name

property name

value

property value

writeFloat(val:Float):Void

writeInt(val:Int):Void

writeMultiByte(value:String, charSet:String):Void

writeObject(v:Dynamic):Void

writeShort(short:Int):Void

writeUInt29(v:UInt):Void

Writes a special 29-bit integer type that is supported by AMF.

writeUTF(str:String):Void

writeUTFBytes(str:String):Void