Packagesystem
Classpublic class ByteArrays
InheritanceByteArrays Inheritance Object

The static ByteArray tool class.



Public Methods
 MethodDefined By
  
clone(byteArray:ByteArray):ByteArray
[static] Returns a shallow copy of the specified ByteArray object.
ByteArrays
  
copy(from:ByteArray, fromOffset:int, to:ByteArray, toOffset:int, length:int):void
[static] This function can copy a ByteArray in a other ByteArray.
ByteArrays
  
equals(first:ByteArray, second:ByteArray):Boolean
[static] Indicates if two passed-in ByteArray objects are equal.
ByteArrays
Method Detail
clone()method
public static function clone(byteArray:ByteArray):ByteArray

Returns a shallow copy of the specified ByteArray object. The cloned ByteArray contains the same bytes and the current position is the same as the original. The current position of the original ByteArray is not changed.

Parameters

byteArray:ByteArray — the ByteArray to be cloned.

Returns
ByteArray — A shallow copy of the specified ByteArray object.
copy()method 
public static function copy(from:ByteArray, fromOffset:int, to:ByteArray, toOffset:int, length:int):void

This function can copy a ByteArray in a other ByteArray.

Parameters

from:ByteArray — The ByteArray to copy with the specified offset.
 
fromOffset:int — A zero-based index indicating the position into the array to begin the copy.
 
to:ByteArray — The destination ByteArray to copy all bytes in the from ByteArray.
 
toOffset:int — A zero-based index indicating the position into the array to begin the insert of the from ByteArray.
 
length:int — An unsigned integer indicating how far into the buffer to write.

equals()method 
public static function equals(first:ByteArray, second:ByteArray):Boolean

Indicates if two passed-in ByteArray objects are equal.

Two ByteArray objects are considered equal if and only if all bytes they contain are equal and in the same order.

Parameters

first:ByteArray — The first ByteArray to be compared.
 
second:ByteArray — The second ByteArray to be compared.

Returns
Booleantrue if the ByteArray object are equal, false otherwise.