CreateByteArray

From Spheriki

Jump to: navigation, search

Creates a ByteArray object of a given length.


Contents

Usage

ByteArray CreateByteArray(length);
  • length Number, positive. The length of the ByteArray to create.


Examples

var ba = CreateByteArray(15);

Makes a ByteArray of length fifteen (15). The initial elements range between indices zero (0) to fourteen (14), accessed using ba[index].


Notes

  • This function is most useful for making empty, clean ByteArrays, which you later wish to manipulate in some way. To funnel a string through a network connection or into a RawFile, use CreateByteArrayFromString() instead.


See also

Personal tools