TStreamFileWriter() > Methods |
|
|
oTStreamFileWriter:write()
Writes data from memory into the stream.
Syntax
:write( <cBuffer>, [<nOffset>], [<nBytes>] ) --> nBytesWritten
Arguments
- <cBuffer>
- This is a character string to write to the stream.
- <nBytes>
- A numeric value specifying the number of bytes to write to the stream, beginning
with the first character of <cBuffer>. It defaults to Len( <cBuffer> ), i.e.
all bytes of <cBuffer>.
- <nOffset>
- This is a numeric value specifying the number of bytes to skip at the beginning
of <cBuffer>. This allows to write data from the middle of a string buffer into
the stream. The default value is zero. Note that the sum of <nBytes>+<nOffset> must
be smaller than or equal Len(<cBuffer>).
Description
Method :write() writes <nBytes> minus <nOffset> bytes from the string buffer <cBuffer>
to the data stream, beginning at the current position ::nPosition.
The file pointer is advanced by <nBytes>-<nOffset> bytes and the number of bytes written
is returned as a numeric value.
Refer to function FWrite() for more information on writing to a low-level file.
Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe