2005/5/9

     
 

class InflaterReader

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

acdk::vfile::InflaterReader Class Reference

#include <InflaterReader.h>

Inheritance diagram for acdk::vfile::InflaterReader:

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.

Public Member Functions

 InflaterReader (IN(::acdk::io::RReader) in)
 ~InflaterReader ()
virtual int available ()
 returns the number of bytes available in this stream before blocking Some Reader always return 0

virtual void close ()
 closes this Reader.

virtual jlong seek (acdk::io::SeekPos seekrel, jlong seekpos)
 Set stream position in this Reader to given position.

virtual jlong skip (jlong n)
 Move forwart into the stream.

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)
virtual void reset ()
 if mark is set, set stream to mark point otherwise to begin of this stream.

virtual bool ready ()
virtual void mark (int readAheadLimit)
virtual bool markSupported ()

Protected Member Functions

void init ()
void fillBuffer ()

Private Attributes

z_stream _zstream
bool _initialized
::acdk::lang::sys::core_vector<
byte
_inbuf
::acdk::lang::sys::core_vector<
byte
_outbuf
int _pos
int _available
 how many are availabe in _outbuf


Constructor & Destructor Documentation

acdk::vfile::InflaterReader::InflaterReader IN(::acdk::io::RReader in  ) 
 

acdk::vfile::InflaterReader::~InflaterReader  ) 
 


Member Function Documentation

virtual int acdk::vfile::InflaterReader::available  )  [virtual]
 

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

Reimplemented from acdk::io::AbstractFilterReader.

virtual void acdk::vfile::InflaterReader::close  )  [virtual]
 

closes this Reader.

Note: Some Reader must be closed explicitaly Note: Reader implementation must be avare from closing a reader more than one

Reimplemented from acdk::io::AbstractFilterReader.

void acdk::vfile::InflaterReader::fillBuffer  )  [protected]
 

void acdk::vfile::InflaterReader::init  )  [protected]
 

virtual void acdk::vfile::InflaterReader::mark int  readAheadLimit  )  [inline, virtual]
 

Reimplemented from acdk::io::AbstractFilterReader.

virtual bool acdk::vfile::InflaterReader::markSupported  )  [inline, virtual]
 

Reimplemented from acdk::io::AbstractFilterReader.

virtual int acdk::vfile::InflaterReader::read byte buffer,
int  offset,
int  len
[virtual]
 

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

Reimplemented from acdk::io::AbstractFilterReader.

virtual int acdk::vfile::InflaterReader::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::vfile::InflaterReader::read  )  [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.

virtual bool acdk::vfile::InflaterReader::ready  )  [inline, virtual]
 

Returns:
true, if at least 1 byte can be readed from stream

Reimplemented from acdk::io::AbstractFilterReader.

virtual void acdk::vfile::InflaterReader::reset  )  [inline, virtual]
 

if mark is set, set stream to mark point otherwise to begin of this stream.

Reimplemented from acdk::io::AbstractFilterReader.

virtual jlong acdk::vfile::InflaterReader::seek acdk::io::SeekPos  seekrel,
jlong  seekpos
[virtual]
 

Set stream position in this Reader to given position.

Returns:
the absolute position in this stream

Reimplemented from acdk::io::AbstractFilterReader.

virtual jlong acdk::vfile::InflaterReader::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::vfile::InflaterReader::_available [private]
 

how many are availabe in _outbuf

::acdk::lang::sys::core_vector<byte> acdk::vfile::InflaterReader::_inbuf [private]
 

bool acdk::vfile::InflaterReader::_initialized [private]
 

::acdk::lang::sys::core_vector<byte> acdk::vfile::InflaterReader::_outbuf [private]
 

int acdk::vfile::InflaterReader::_pos [private]
 

z_stream acdk::vfile::InflaterReader::_zstream [private]