Adobe Flash Player supports an accelerated method of reading and writing to the ByteArray object, known as "domain memory"

The Memory API provides access to domain memory using Memory.select on an existing ByteArray on the Flash target, and falls back to standard access on other targets.

Static methods

staticinline getByte (position:Int):Int

Get a byte from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

An 8-bit integer value

staticinline getDouble (position:Int):Float

Get a double from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

A 64-bit floating point value

staticinline getFloat (position:Int):Float

Get a float from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

A 32-bit floating-point value

staticinline getI32 (position:Int):Int

Get an int from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

A 32-bit integer value

staticinline getUI16 (position:Int):Int

Return an unsigned int from the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

Returns:

An unsigned 16-bit integer value

staticselect (byteArray:ByteArray):Void

Selects the ByteArray to use for subsequent domain memory access

Parameters:

byteArray

A ByteArray object to use for memory

staticinline setByte (position:Int, v:Int):Void

Set a byte at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

An 8-bit byte value

staticinline setDouble (position:Int, v:Float):Void

Set a double at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 64-bit floating-point value

staticinline setFloat (position:Int, v:Float):Void

Set a float at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 32-bit floating-point value

staticinline setI16 (position:Int, v:Int):Void

Set an int at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 16-bit integer value

staticinline setI32 (position:Int, v:Int):Void

Set a long int at the specified memory address

Parameters:

position

An existing address in the selected ByteArray memory

v

A 32-bit integer value