Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lrt::FilterOutputStream Class Reference

A FilterOutputStream is a stream which just performs any operations on another stream. More...

#include <rtstreams.h>

Inheritance diagram for lrt::FilterOutputStream:

Inheritance graph
[legend]
List of all members.

Public Methods

 FilterOutputStream (OutputStream *out)
 Constructs a new FilterOutputStream, which writes its data from the underlying stream out.

virtual bool write (int b)
 Writes a byte to the underlying output stream. More...

virtual bool write (const Array< char > &b, int off, int len)
 Writes part of an array to the underlying output stream. More...

virtual bool write (const Array< char > &b)
 Writes the whole array b to the output stream. More...

virtual void flush ()
 Advises the underlying output stream to flush its output buffer.

virtual void close ()
 Closes the underlying output stream. More...

virtual ~FilterOutputStream ()
 Destroys this FilterOutputStream and the underlying output stream.


Protected Attributes

OutputStream * out
 The underlying output stream, where data is written to.


Detailed Description

A FilterOutputStream is a stream which just performs any operations on another stream.

This class has no practical application, but it's a good starting point for clever streams.


Member Function Documentation

void lrt::FilterOutputStream::close (    )  [virtual]
 

Closes the underlying output stream.

Note that closed streams cannot be re-opened.

Reimplemented from lrt::OutputStream.

bool lrt::FilterOutputStream::write (  const Array< char > &    b )  [virtual]
 

Writes the whole array b to the output stream.

Since String is derived from Array<char> in libRT, you may also use this method to write Strings to the output stream.

Returns:
Whether writing the array succeeded.

Reimplemented from lrt::OutputStream.

bool lrt::FilterOutputStream::write (  const Array< char > &    b,
int    off,
int    len
)  [virtual]
 

Writes part of an array to the underlying output stream.

Returns:
Whether writing succeeded.

Reimplemented from lrt::OutputStream.

bool lrt::FilterOutputStream::write (  int    b )  [virtual]
 

Writes a byte to the underlying output stream.

Returns:
Whether writing succeeded.

Implements lrt::OutputStream.


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer