Skip Headers

Oracle C++ Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96583-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

OCCI Classes and Methods, 21 of 22


Stream Class

You use a Stream to read or write streamed data (usually LONG).

Summary of Stream Methods

Table 8-21 Stream Methods  
Method Summary

readBuffer()

Reads the stream and returns the amount of data read from the Stream object.

readLastBuffer()

Reads last buffer from Stream.

writeBuffer()

Writes data from buffer to the stream.

writeLastBuffer()

Writes the last data from buffer to the stream.

status()

Returns the current status of the stream.

readBuffer()

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.

Syntax
int readBuffer(char *buffer,
   unsigned int size);
Parameters
buffer

Pointer to data buffer; must be allocated and freed by caller

size

Size of the buffer.

readLastBuffer()

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.

Syntax
int readLastBuffer(char *buffer,
   unsigned int size);
Parameters
buffer

Pointer to data buffer; must be allocated and freed by caller.

size

Specifies the maximum number of bytes to be read.

writeBuffer()

Writes data from buffer to the stream. The amount of data written is determined by size.

Syntax
void writeBuffer(char *buffer,
   unsigned int size);
Parameters
buffer

Pointer to data buffer.

size

Number of char's in the buffer.

writeLastBuffer()

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.

Syntax
void writeLastBuffer(char *buffer,
   unsigned int size);
Parameters
buffer

Pointer to data buffer.

size

Specifies the number of bytes to be written.

status()

Returns the current status of the streams, which can be one of the following:

Syntax
Status status() const;

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback