contents   index   previous   next



Buffer bigEndian

syntax:

buffer.bigEndian

description:

This property is a boolean flag specifying whether to use bigEndian byte ordering when calling Buffer getValue() and Buffer putValue(). This value is set when a buffer is created, but may be changed at any time. This property defaults to the state of the underlying OS and processor.

 

see:

Buffer unicode, Buffer()

 

example:

/********************************

The default behavior for a Windows 2000

using an i386 type of processor results

in the following buffer or 6 bytes:

   65 00 66 00 67 00

********************************/

var i;

var b = new Buffer("ABC", true);

 

/********************************

With bigEndian set, as in the following,

the buffer is:

   00 65 00 66 00 67

********************************/

var i;

var b = new Buffer("ABC", true, true);

 


Buffer cursor