Oracle C++ Call Interface Programmer's Guide Release 2 (9.2) Part Number A96583-01 |
|
OCCI Classes and Methods, 21 of 22
You use a Stream to read or write streamed data (usually LONG).
Stream() enum Status { READY_FOR_READ, READY_FOR_WRITE, INACTIVE };
Reads data from Stream
. The size parameter specifies the maximum number of byte characters to read. Returns the amount of data read from the Stream
object. -1 means end of data on the stream.
int readBuffer(char *buffer, unsigned int size);
Pointer to data buffer; must be allocated and freed by caller
Size of the buffer.
This method reads the last buffer from the Stream
. It can also be called top discard unread data.
The size parameter specifies the maximum number of byte characters to read. Returns the amount of data read from the Stream
object. -1 means end of data on the stream.
int readLastBuffer(char *buffer, unsigned int size);
Pointer to data buffer; must be allocated and freed by caller.
Specifies the maximum number of bytes to be read.
Writes data from buffer to the stream. The amount of data written is determined by size.
void writeBuffer(char *buffer, unsigned int size);
Pointer to data buffer.
Number of char's in the buffer.
This method writes the last data buffer to the stream. It can also be called to write the last chunk of data.
The amount of data written is determined by size.
void writeLastBuffer(char *buffer, unsigned int size);
Pointer to data buffer.
Specifies the number of bytes to be written.
Returns the current status of the streams, which can be one of the following:
Status status() const;
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|