10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stream Class<br />

You use a Stream to read or write streamed data (usually LONG).<br />

Stream Class<br />

■ A read-able stream is used to obtain streamed data from a result set or OUT<br />

bind variable from a stored procedure call. A read-able stream must be read<br />

completely until the end of data is reached or it should be closed to discard any<br />

unwanted data.<br />

■ A write-able stream is used to provide streamed data (usually LONG) to<br />

parameterized statements including callable statements.<br />

Stream()<br />

enum Status<br />

{<br />

READY_FOR_READ,<br />

READY_FOR_WRITE,<br />

INACTIVE<br />

};<br />

Summary of Stream Methods<br />

readBuffer()<br />

Table 8–21 Stream Methods<br />

Method Summary<br />

readBuffer() on page 8-211 Reads the stream and returns the amount of data read<br />

from the Stream object.<br />

readLastBuffer() on page 8-212 Reads last buffer from Stream.<br />

writeBuffer() on page 8-212 Writes data from buffer to the stream.<br />

writeLastBuffer() on page 8-213 Writes the last data from buffer to the stream.<br />

status() on page 8-213 Returns the current status of the stream.<br />

Reads data from Stream. The size parameter specifies the maximum number of<br />

byte characters to read. Returns the amount of data read from the Stream object. -1<br />

means end of data on the stream.<br />

OCCI Classes and Methods 8-211

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!