2005/5/9

     
 

class SubReader

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

acdk::io::SubReader Class Reference

#include <SubReader.h>

Inheritance diagram for acdk::io::SubReader:

acdk::io::AbstractFilterReader 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

A SubReader is a filter, which reads a segement from another reader
API: ACDK.

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


Public Member Functions

 SubReader (IN(RReader) in, int startoffset, int len)
int available ()
 returns the number of bytes available in this stream before blocking Some Reader always return 0

jlong seek (::acdk::io::SeekPos seekrel, jlong seekpos)
jlong skip (jlong n)
 Move forwart into the stream.

int read (byte *buffer, int offset, int len)
int read ()
 read a single byte from stream

int read (IN(RbyteArray) buffer, int offset, int len)
 read the len bytes into buffer at offset of the buffer


Private Attributes

int _start
int _length
int _curpos


Constructor & Destructor Documentation

acdk::io::SubReader::SubReader IN(RReader in,
int  startoffset,
int  len
 


Member Function Documentation

int acdk::io::SubReader::available  )  [virtual]
 

returns the number of bytes available in this stream before blocking Some Reader always return 0

Reimplemented from acdk::io::AbstractFilterReader.

int acdk::io::SubReader::read IN(RbyteArray buffer,
int  offset,
int  len
[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.

int acdk::io::SubReader::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.

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

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

Reimplemented from acdk::io::AbstractFilterReader.

jlong acdk::io::SubReader::seek ::acdk::io::SeekPos  seekrel,
jlong  seekpos
 

jlong acdk::io::SubReader::skip jlong  n  )  [virtual]
 

Move forwart into the stream.

Returns:
how many bytes skipped. May less then input, in case EOS is reached

Reimplemented from acdk::io::AbstractFilterReader.


Member Data Documentation

int acdk::io::SubReader::_curpos [private]
 

int acdk::io::SubReader::_length [private]
 

int acdk::io::SubReader::_start [private]