|Bookshelf Home | Contents | Index | PDF|
If size is specified, then the new buffer is created with the specified size and filled with null bytes. If no size is specified, then the buffer is created with a size of 0, although it can be extended dynamically later.
The unicode parameter is an optional Boolean flag describing the initial state of the Unicode flag of the object. Similarly, bigEndian describes the initial state of the bigEndian parameter of the buffer.
This syntax creates a new Buffer object from the string provided. If the string parameter is a Unicode string (if Unicode is enabled within the application), then the buffer is created as a Unicode string.
This behavior can be overridden by specifying true or false with the optional Boolean Unicode parameter. If this parameter is set to false, then the buffer is created as an ASCII string, regardless of whether the original string was in Unicode or not.
Similarly, specifying true makes sure that the buffer is created as a Unicode string. The size of the buffer is the length of the string (twice the length if it is Unicode). This constructor does not add a terminating null byte at the end of the string.
A line of code following this syntax creates a new buffer object from the buffer provided. The contents of the buffer are copied as-is into the new buffer object. The unicode and bigEndian parameters do not affect this conversion, although they do set the relevant flags for future use.
A line of code following this syntax creates a new Buffer object from another Buffer object. Everything is duplicated exactly from the other bufferObject, including the cursor location, size, and data.
|Siebel eScript Language Reference|