OLLayeredOutStream Class Reference
[Streams]

An out stream that is layered over another out stream. More...

#import <ObjectiveLib/LayeredOutStream.h>

Inheritance diagram for OLLayeredOutStream:

Inheritance graph
[legend]
List of all members.

Public Member Functions

(void) - close
 Close the stream.
(id) - connectedOutStream
 Return the OLConnectedOutStream at the bottom of the stream stack.
(void) - flush
 Flush the stream.
(void) - freeStreamResources
 Free the stream's resources.
(unsigned) - writeBytes:count:
 Write bytes to the stream.
Initializers and Deallocators
(id) - initWithOutStream:
 Initialize the stream.

Protected Attributes

OLOutStreamstream
 The stream on top of which this stream is layered.

Detailed Description

An out stream that is layered over another out stream.

Layered streams can filter data that are ultimately written out to connected streams. The methods in OLLayeredOutStream merely forward messages to the underlying out stream.

See also:
Streams


Member Function Documentation

- (void) close  

Close the stream.

After receiving this message the stream will no longer be available for writing.

Exceptions:
OLInputOutputException if there is an error closing the stream

Reimplemented from OLOutStream.

Reimplemented in OLBzlibOutStream, OLGzipOutStream, and OLZlibOutStream.

- (id) connectedOutStream  

Return the OLConnectedOutStream at the bottom of the stream stack.

All layered streams in this stack of layered streams will return the same value of the connected stream.

Note:
The returned value should not be released, as that will destroy the integrity of the stream stack. The returned object will be a type of OLConnectedOutStream, but it is returned as an id to enable more freedom in calling its methods.
Returns:
the connected stream

- (void) flush  

Flush the stream.

Any data that is pending or buffered will be written and the stream will be restored to a pristine state.

Exceptions:
OLInputOutputException if there is an error flushing the stream

Reimplemented from OLOutStream.

Reimplemented in OLBufferingOutStream.

- (void) freeStreamResources  

Free the stream's resources.

This secondary freeing method is necessary to allow the reference count to be properly manipulated from within the normal free (OLReferenceCountedStream) method.

Note:
All sublcasses that allocate resources must implement this method to free those resources and call [super freeStreamResources].

Reimplemented from OLReferenceCountedStream.

Reimplemented in OLBufferingOutStream, OLBzlibOutStream, OLGzipOutStream, OLObjectOutStream, and OLZlibOutStream.

- (id) initWithOutStream: (OLOutStream *)  underStream  

Initialize the stream.

Parameters:
underStream the stream that functions as the layer under this one
Returns:
a reference to this stream

Reimplemented in OLBufferingOutStream, OLBzlibOutStream, OLObjectOutStream, and OLZlibOutStream.

- (unsigned) writeBytes: (const uint8_t *)  bytes
count: (unsigned)  count 

Write bytes to the stream.

This implementation merely forwards the message to the next lower stream in the stream stack.

Exceptions:
OLInputOutputException if there is an error writing to the stream
Parameters:
bytes the bytes to write
count the number of bytes to write
Returns:
the number of bytes written

Reimplemented from OLOutStream.

Reimplemented in OLBufferingOutStream, OLBzlibOutStream, OLGzipOutStream, and OLZlibOutStream.


Member Data Documentation

- (OLOutStream*) stream [protected]

The stream on top of which this stream is layered.


The documentation for this class was generated from the following file:
ObjectiveLibGenerated Sun Apr 22 15:18:44 2007, © 2004-2007 Will Mason
SourceForge.net Logo