contents   index   previous   next



Buffer getValue()

syntax:

buffer.getValue([valueSize[, valueType]])

where:

valueSize - a positive number describing the number of bytes to be used and defaults to 1. The following are acceptable values: 1, 2, 3, 4, 8, and 10

 

valueType - One of the following types: "signed", "unsigned", or "float". The default type is: "signed."

 

return:

number - from the position, specified by the cursor property, in a Buffer object.

 

description:

This call is similar to the Buffer putValue() function, except that it gets a value instead of puts a value.

 

see:

Buffer putValue(), Buffer[] Array

 

example:

/*

To explicitly put a value at a specific location

while preserving the cursor location,

do something similar to the following.

*/

 

   // Save the old cursor location

var oldCursor = foo.cursor;

   // Set to new location

foo.cursor = 20;

   // Get goo at offset 20

bar = foo.getValue(goo);

   // Restore cursor location

foo.cursor = oldCursor

 

//Please see Buffer.putValue

// for a more complete description.

 


Buffer putString()