Skip Headers
Oracle® C++ Call Interface Programmer's Guide,
11g Release 2 (11.2)

Part Number E10764-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
LNCPP1023

Stream Class

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

LNCPP21788Table 13-45 Enumerated Values Used by Stream Class

Attribute Options
Status
  • READY_FOR_READ indicates that the Stream is ready for read operations

  • READY_FOR_WRITE indicates that the Stream is ready for write operations

  • INACTIVE indicates that the Stream is not available for ready or write operations


LNCPP21789Table 13-46 Summary of 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.


LNCPP21790

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.

LNCPP21791Syntax

virtual int readBuffer(
   char *buffer,
   unsigned int size) = 0;
Parameter Description
buffer
Pointer to data buffer; must be allocated and freed by caller.
size
Specifies the number of bytes to be read.

LNCPP21792

readLastBuffer()

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.

LNCPP21793Syntax

virtual int readLastBuffer(
   char *buffer,
   unsigned int size) = 0;
Parameter Description
buffer
Pointer to data buffer; must be allocated and freed by caller.
size
Specifies the number of bytes to be read.

LNCPP21794

writeBuffer()

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

LNCPP21795Syntax

virtual void writeBuffer(
   char *buffer,
   unsigned int size) = 0;
Parameter Description
buffer
Pointer to data buffer.
size
Specifies the number of chars to be written.

LNCPP21796

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.

LNCPP21797Syntax

virtual void writeLastBuffer(
   char *buffer,
   unsigned int size) = 0;
Parameter Description
buffer
Pointer to data buffer.
size
Specifies the number of bytes to be written.

LNCPP21798

status()

Returns the current Status, as defined in Table 13-45 .

LNCPP21799Syntax

virtual Status status() const;
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF