Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

OSInputStreamIF Class Reference

The base interface class for input streams. More...

#include <rtxCppInputStreamIF.h>

Inheritance diagram for OSInputStreamIF:

OSStreamIF OSInputStream OSBufferedInputStream OSFileInputStream OSMemoryInputStream List of all members.

Public Member Functions

virtual ~OSInputStreamIF ()
 Virtual destructor.

virtual void close ()=0
 Closes the input or output stream and releases any system resources associated with the stream.

virtual size_t currentPos ()=0
 This method returns the current position in the stream (in octets).

virtual void flush ()=0
 Flushes the buffered data to the stream.

virtual OSBOOL isOpened ()=0
 Checks, is the stream opened or not.

virtual OSBOOL markSupported ()=0
 Tests if this input stream supports the mark and reset methods.

virtual void mark (size_t readAheadLimit)=0
 This method marks the current position in this input stream.

virtual size_t read (OSOCTET *pDestBuf, size_t maxToRead)=0
 Read data from the stream.

virtual size_t readBlocking (OSOCTET *pDestBuf, size_t toReadBytes)=0
 Read data from the stream.

virtual void reset ()=0
 Repositions this stream to the position at the time the mark method was last called on this input stream.

virtual void skip (size_t n)=0
 Skips over and discards the specified amount of data octets from this input stream.


Detailed Description

The base interface class for input streams.

Definition at line 36 of file rtxCppInputStreamIF.h.


Constructor & Destructor Documentation

virtual OSInputStreamIF::~OSInputStreamIF  )  [virtual]
 

Virtual destructor.

Closes the stream if it was opened.


Member Function Documentation

virtual void OSInputStreamIF::close  )  [pure virtual]
 

Closes the input or output stream and releases any system resources associated with the stream.

For output streams this function also flushes all internal buffers to the stream.

See also:
rtxStreamClose
Exceptions:
OSStreamException I/O error occurred.

Implements OSStreamIF.

Implemented in OSInputStream.

virtual size_t OSInputStreamIF::currentPos  )  [pure virtual]
 

This method returns the current position in the stream (in octets).

Returns:
The number of octets already read from the stream.

Implemented in OSInputStream.

virtual void OSInputStreamIF::flush  )  [pure virtual]
 

Flushes the buffered data to the stream.

See also:
rtxStreamFlush
Exceptions:
OSStreamException I/O error occurred.

Implements OSStreamIF.

Implemented in OSInputStream.

virtual OSBOOL OSInputStreamIF::isOpened  )  [pure virtual]
 

Checks, is the stream opened or not.

Returns:
s TRUE, if the stream is opened, FALSE otherwise.
See also:
rtxStreamIsOpened

Implements OSStreamIF.

Implemented in OSInputStream.

virtual void OSInputStreamIF::mark size_t  readAheadLimit  )  [pure virtual]
 

This method marks the current position in this input stream.

A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes. The readAheadLimit argument tells this input stream to allow that many bytes to be read before the mark position gets invalidated.

Parameters:
readAheadLimit the maximum limit of bytes that can be read before the mark position becomes invalid.
Exceptions:
OSStreamException if error occurred.
See also:
rtxStreamMark, rtxStreamReset

Implemented in OSInputStream.

virtual OSBOOL OSInputStreamIF::markSupported  )  [pure virtual]
 

Tests if this input stream supports the mark and reset methods.

Whether or not mark and reset are supported is an invariant property of a particular input stream instance. By default, it returns FALSE.

Returns:
TRUE if this stream instance supports the mark and reset methods; FALSE otherwise.
See also:
::rtxStreamIsMarkSupported

Implemented in OSInputStream.

virtual size_t OSInputStreamIF::read OSOCTET *  pDestBuf,
size_t  maxToRead
[pure virtual]
 

Read data from the stream.

This method reads up to maxToRead bytes from the stream. It may return a value less then this if the mamimum number of bytes is not available.

Parameters:
pDestBuf Pointer to a buffer to receive a data.
maxToRead Size of the buffer.
Exceptions:
OSStreamException data can't be read from the stream.
See also:
rtxStreamRead

Implemented in OSInputStream.

virtual size_t OSInputStreamIF::readBlocking OSOCTET *  pDestBuf,
size_t  toReadBytes
[pure virtual]
 

Read data from the stream.

This method reads up to maxToRead bytes from the stream. It may return a value less then this if the mamimum number of bytes is not available.

Parameters:
pDestBuf Pointer to a buffer to receive a data.
toReadBytes Number of bytes to be read.
Exceptions:
OSStreamException data can't be read from the stream.
See also:
rtxStreamRead

Implemented in OSInputStream.

virtual void OSInputStreamIF::reset  )  [pure virtual]
 

Repositions this stream to the position at the time the mark method was last called on this input stream.

Exceptions:
OSStreamException if error occurred.
See also:
rtxStreamMark, rtxStreamReset

Implemented in OSInputStream.

virtual void OSInputStreamIF::skip size_t  n  )  [pure virtual]
 

Skips over and discards the specified amount of data octets from this input stream.

Parameters:
n The number of octets to be skipped.
Exceptions:
OSStreamException if error occurred.
See also:
rtxStreamSkip

Implemented in OSInputStream.


The documentation for this class was generated from the following file:

This file was last modified on 1 Jun 2004.
XBinder, Version 1.0.0