2005/5/9

     
 

class TeeReader

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::io::TeeReader Class Reference

#include <TeeReader.h>

Inheritance diagram for acdk::io::TeeReader:

acdk::io::AbstractFilterReader acdk::io::FilterReader acdk::io::AbstractReader acdk::io::FilterReader acdk::lang::Object acdk::io::Reader acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Tee reader spawn a reader stream into 1 reader and 1 writer streams.

API: ACDK

Author:
Roger Rene Kommer (mailto:kommer@artefaktur.com)
Version:
Revision
1.11
Date:
Date
2005/02/05 10:44:54


Public Member Functions

 TeeReader (IN(RReader) from, IN(RWriter) to)
RWriter getOut ()
virtual int read ()
 read a single byte from stream

virtual int read (IN(RbyteArray) buffer, int offset=0, int len=-1)
 read the len bytes into buffer at offset of the buffer

virtual int read (byte *buffer, int offset, int len)

Private Attributes

RWriter _out


Constructor & Destructor Documentation

acdk::io::TeeReader::TeeReader IN(RReader from,
IN(RWriter to
[inline]
 


Member Function Documentation

RWriter acdk::io::TeeReader::getOut  )  [inline]
 

virtual int acdk::io::TeeReader::read byte buffer,
int  offset,
int  len
[inline, virtual]
 

See also:
other read(RbyteArray, int, int)

Reimplemented from acdk::io::AbstractFilterReader.

virtual int acdk::io::TeeReader::read IN(RbyteArray buffer,
int  offset = 0,
int  len = -1
[inline, virtual]
 

read the len bytes into buffer at offset of the buffer

Parameters:
buffer where to write the bytes
offset offset to write into buffer
len how many bytes to read. if == -1 read into many bytes, that fits into buffer (buffer->length() - offset) ``
Returns:
number of bytes readed. may less than input if EOS is reached
Exceptions:
EOF exception, if trying to read behind EOS

Reimplemented from acdk::io::AbstractFilterReader.

virtual int acdk::io::TeeReader::read  )  [inline, virtual]
 

read a single byte from stream

Returns:
the byte readed or -1 if EOS.
Exceptions:
EOF exception, if trying to read behind EOS

Reimplemented from acdk::io::AbstractFilterReader.


Member Data Documentation

RWriter acdk::io::TeeReader::_out [private]