Closes the file referenced in the BinaryStream object.
var myFile = new File( 'PROJECT/logs/HTTPServer.waLog' );
var readstream = new BinaryStream( myFile );
// Important to close the stream after every use to release the referenced file
readstream.close();
Saves the buffer contents to the disk file referenced in the BinaryStream object. @throw may throw exception if an error occur
Creates a new BLOB object containing the next sizeToRead data in the BinaryStream object.
Returns a new Buffer object containing the next sizeToRead data in the BinaryStream object. Otherwise, return null
Returns a number representing the next byte from the BinaryStream object. Otherwise, return null
Returns the next long number (if present) from the BinaryStream object. Otherwise, return null
Returns the next long64 number (if present) from the BinaryStream object. Otherwise, return null
Returns the current position of the cursor in the BinaryStream object. Otherwise, return null
Returns the next real (if present) from the BinaryStream object. Otherwise, return null
Returns the size of the stream.
Returns the next string (if present) from the BinaryStream object. Otherwise, return null
Returns the next word, i.e., a binary integer (if present) from the BinaryStream object. Otherwise, return null
true
if the current data reading in the BinaryStream object is in byte swap mode.
Writes the BLOB you passed as the blob parameter in the BinaryStream object at the current cursor location.
Writes the Buffer you passed as the buffer parameter in the BinaryStream object at the current cursor location.
Writes the byte value you passed as the parameter in the BinaryStream object at the current cursor location.
Writes the long value you passed as the parameter in the BinaryStream object at the current cursor location.
Writes the long64 value you passed as the parameter in the BinaryStream object at the current cursor location.
Writes the real value you passed as the parameter in the BinaryStream object at the current cursor location.
Writes the string value you passed as the parameter in the BinaryStream object at the current cursor location.
Writes the byte word (i.e., an integer value) you passed as the parameter in the BinaryStream object at the current cursor location.
Moves the stream cursor to the position you passed in offset in the BinaryStream object.
Indicates that the next reading of structured values in the BinaryStream object requires a byte swap