unlockSeg()  Map objects

Chapter 5: General Objects and Methods

write()

Description

Writes the contents of the buffer for length (len) to the I/O file objects’s associated file starting from the current offset position in the file. If len equals zero, all data in the buffer is written to the file. If the I/O file object has “append” set to “on,” this method always appends the data to the file.

Syntax

write(blob *buffer, int len);
write(string *buffer, int len);
write(string buffer, int len);

Parameter

Description

buffer

String object or a pointer to a string or blob object containing the data from which to write to the file.

len

The number of bytes to write. If len is 0, it writes all data in the buffer to the file.

Return value

Integer. Returns the number of bytes written to the file, if successful, and 0, if failed.

Usage

Pointer to object

Object

my_iofobj.write(“new data”, 0);

string buffer;buffer = “some old data plus new”;piof->write(&buffer, 15);





Copyright © 2005. Sybase Inc. All rights reserved. Map objects

View this book as PDF