62
edits
m (→Specification: more definition lists) |
m (→Constructor) |
||
| Line 88: | Line 88: | ||
=== Constructor === | === Constructor === | ||
; ByteArray() | |||
: New, empty ByteArray. | |||
; ByteArray(length) | |||
: New ByteArray filled with length zero bytes. | |||
; ByteArray(byteArray) | |||
: Copy byteArray. | |||
; ByteArray(byteString) | |||
: Copy contents of byteString. | |||
; ByteArray(arrayOfBytes) | |||
: Use numbers in arrayOfBytes as contents. | |||
: Throws an exception if any element is outside the range 0...255 (''TODO''). | |||
; ByteArray(string, codec) | |||
: Create a ByteArray from a Javascript string, the result being encoded with codec. | |||
Unlike the Array, the ByteArray is not variadic so that its initial length constructor is not ambiguous with its copy constructor. | Unlike the Array, the ByteArray is not variadic so that its initial length constructor is not ambiguous with its copy constructor. | ||
edits