ByteArray.hx 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package flash.utils;
  2. extern class ByteArray implements IDataOutput, implements IDataInput, implements ArrayAccess<Int> {
  3. var bytesAvailable(default,null) : UInt;
  4. var endian : Endian;
  5. var length : UInt;
  6. var objectEncoding : UInt;
  7. var position : UInt;
  8. function new() : Void;
  9. @:require(flash10) function clear() : Void;
  10. function compress(#if flash11 ?algorithm : CompressionAlgorithm #end) : Void;
  11. @:require(flash10) function deflate() : Void;
  12. @:require(flash10) function inflate() : Void;
  13. function readBoolean() : Bool;
  14. function readByte() : Int;
  15. function readBytes(bytes : ByteArray, offset : UInt = 0, length : UInt = 0) : Void;
  16. function readDouble() : Float;
  17. function readFloat() : Float;
  18. function readInt() : Int;
  19. function readMultiByte(length : UInt, charSet : String) : String;
  20. function readObject() : Dynamic;
  21. function readShort() : Int;
  22. function readUTF() : String;
  23. function readUTFBytes(length : UInt) : String;
  24. function readUnsignedByte() : UInt;
  25. function readUnsignedInt() : UInt;
  26. function readUnsignedShort() : UInt;
  27. function toString() : String;
  28. function uncompress(#if flash11 ?algorithm : CompressionAlgorithm #end) : Void;
  29. function writeBoolean(value : Bool) : Void;
  30. function writeByte(value : Int) : Void;
  31. function writeBytes(bytes : ByteArray, offset : UInt = 0, length : UInt = 0) : Void;
  32. function writeDouble(value : Float) : Void;
  33. function writeFloat(value : Float) : Void;
  34. function writeInt(value : Int) : Void;
  35. function writeMultiByte(value : String, charSet : String) : Void;
  36. function writeObject(object : Dynamic) : Void;
  37. function writeShort(value : Int) : Void;
  38. function writeUTF(value : String) : Void;
  39. function writeUTFBytes(value : String) : Void;
  40. function writeUnsignedInt(value : UInt) : Void;
  41. static var defaultObjectEncoding : UInt;
  42. }