diff --git a/core/src/avm2/globals/flash/utils/ByteArray.as b/core/src/avm2/globals/flash/utils/ByteArray.as index 76be70f78a93..0eb0d37492e4 100644 --- a/core/src/avm2/globals/flash/utils/ByteArray.as +++ b/core/src/avm2/globals/flash/utils/ByteArray.as @@ -1,6 +1,6 @@ package flash.utils { [Ruffle(InstanceAllocator)] - public class ByteArray implements IDataInput { + public class ByteArray implements IDataInput, IDataOutput { private static var _defaultObjectEncoding:uint = 3; public static function get defaultObjectEncoding():uint { return _defaultObjectEncoding; @@ -68,5 +68,9 @@ package flash.utils { public native function writeUnsignedInt(value:uint):void; public native function writeUTF(value:String):void; public native function writeUTFBytes(value:String):void; + public function writeObject(object:*):void { + // STUB + throw new Error("ByteArray.writeObject not implemented"); + } } } diff --git a/core/src/avm2/globals/flash/utils/IDataOutput.as b/core/src/avm2/globals/flash/utils/IDataOutput.as new file mode 100644 index 000000000000..e492e43809a4 --- /dev/null +++ b/core/src/avm2/globals/flash/utils/IDataOutput.as @@ -0,0 +1,22 @@ +package flash.utils { + public interface IDataOutput { + function get objectEncoding():uint; + function set objectEncoding(version:uint):void; + + function get endian():String; + function set endian(type:String):void; + + function writeBoolean(value:Boolean):void; + function writeByte(value:int):void; + function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void; + function writeDouble(value:Number):void; + function writeFloat(value:Number):void; + function writeInt(value:int):void; + function writeMultiByte(value:String, charSet:String):void; + function writeObject(object:*):void; // NOPMD WronglyNamedVariable + function writeShort(value:int):void; + function writeUnsignedInt(value:uint):void; + function writeUTF(value:String):void; + function writeUTFBytes(value:String):void; + } +} \ No newline at end of file diff --git a/core/src/avm2/globals/globals.as b/core/src/avm2/globals/globals.as index 5fb96c83c7ad..cd459eae891a 100644 --- a/core/src/avm2/globals/globals.as +++ b/core/src/avm2/globals/globals.as @@ -7,6 +7,7 @@ include "Math.as" include "flash/accessibility/AccessibilityProperties.as" include "flash/crypto.as" include "flash/utils/IDataInput.as" +include "flash/utils/IDataOutput.as" include "flash/utils/ByteArray.as" include "flash/desktop/ClipboardFormats.as" include "flash/desktop/ClipboardTransferMode.as"