UNPKG

@awayfl/avm2

Version:

Virtual machine for executing AS3 code

120 lines 4.29 kB
import { Multiname } from '../abc/lazy/Multiname'; import { ASObject } from '../nat/ASObject'; import { Bytecode } from '../abc/ops'; import { AXClass } from '../run/AXClass'; export declare enum AMFEncoding { AMF0 = 0, AMF3 = 3, DEFAULT = 3 } export declare class ObjectEncoding extends ASObject { static AMF0: AMFEncoding; static AMF3: AMFEncoding; static DEFAULT: AMFEncoding; static get dynamicPropertyWriter(): any; static set dynamicPropertyWriter(value: any); } export interface IDataInput { readBytes: (bytes: ByteArray, offset?: number, length?: number) => void; readBoolean: () => boolean; readByte: () => number; readUnsignedByte: () => number; readShort: () => number; readUnsignedShort: () => number; readInt: () => number; readUnsignedInt: () => number; readFloat: () => number; readDouble: () => number; readMultiByte: (length: number, charSet: string) => string; readUTF: () => string; readUTFBytes: (length: number) => string; bytesAvailable: number; readObject: () => any; objectEncoding: number; endian: string; } export interface IDataOutput { writeBytes: (bytes: ByteArray, offset?: number, length?: number) => void; writeBoolean: (value: boolean) => void; writeByte: (value: number) => void; writeShort: (value: number) => void; writeInt: (value: number) => void; writeUnsignedInt: (value: number) => void; writeFloat: (value: number) => void; writeDouble: (value: number) => void; writeMultiByte: (value: string, charSet: string) => void; writeUTF: (value: string) => void; writeUTFBytes: (value: string) => void; writeObject: (object: any) => void; objectEncoding: number; endian: string; } export declare class ByteArrayDataProvider { static symbolForConstructor: any; } export declare class ByteArray extends ASObject implements IDataInput, IDataOutput { static axClass: typeof ByteArray & AXClass; static classNatives: any[]; static instanceNatives: any[]; static classInitializer(): void; _symbol: { buffer: Uint8Array; byteLength: number; }; constructor(source?: any); setArrayBuffer(buffer: ArrayBuffer): void; private static INITIAL_SIZE; private static _defaultObjectEncoding; static get defaultObjectEncoding(): number; static set defaultObjectEncoding(version: number); toJSON(): string; private _buffer; private _length; private _position; private _littleEndian; private _objectEncoding; private _bitBuffer; private _bitLength; private _resetViews; readBytes: (bytes: ByteArray, offset?: number, length?: number) => void; readBoolean: () => boolean; readByte: () => number; readUnsignedByte: () => number; readShort: () => number; readUnsignedShort: () => number; readInt: () => number; readUnsignedInt: () => number; readFloat: () => number; readDouble: () => number; readMultiByte: (length: number, charSet: string) => string; readUTF: () => string; readUTFBytes: (length: number) => string; bytesAvailable: number; readObject(): any; writeBytes: (bytes: ByteArray, offset?: number, length?: number) => void; writeBoolean: (value: boolean) => void; writeByte: (value: number) => void; writeShort: (value: number) => void; writeInt: (value: number) => void; writeUnsignedInt: (value: number) => void; writeFloat: (value: number) => void; writeDouble: (value: number) => void; writeMultiByte: (value: string, charSet: string) => void; writeUTF: (value: string) => void; writeUTFBytes: (value: string) => void; writeObject(object: any): void; getBytes: () => Uint8Array; objectEncoding: number; endian: string; readRawBytes: () => Int8Array; writeRawBytes: (bytes: Uint8Array) => void; position: number; length: number; axGetPublicProperty(nm: any): any; axGetNumericProperty(nm: number): any; axSetPublicProperty(nm: any, value: any): void; axSetNumericProperty(nm: number, value: any): void; axGetProperty(mn: Multiname): any; axSetProperty(mn: Multiname, value: any, bc: Bytecode): void; } //# sourceMappingURL=byteArray.d.ts.map