artefaktur
software engineer &        architecture

 
 
 
 

class ZipFileReader

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

acdk::vfile::zip::ZipFileReader Class Reference

#include <ZipFileReader.h>

Inheritance diagram for acdk::vfile::zip::ZipFileReader:

acdk::lang::Object acdk::io::Reader acdk::io::Storage acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Public Member Functions

 ZipFileReader (IN(RZipFileImpl) zip)
 ~ZipFileReader ()
int available ()
 returns the number of bytes available in this stream before blocking Some Reader always return 0

void close ()
 closes this Reader.

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

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

int read ()
 read a single byte from stream

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

int read (byte *buffer, int offset, int len)
void mark (int readAheadLimit)
bool markSupported ()
void reset ()
 if mark is set, set stream to mark point otherwise to begin of this stream.

bool ready ()
RString getDeviceName ()
bool isWriteable ()
bool isReadable ()

Private Attributes

RZipFileImpl _zip
acdk::io::RReader _in
int _cpos

Constructor & Destructor Documentation

acdk::vfile::zip::ZipFileReader::ZipFileReader IN(RZipFileImpl zip  ) 
 

acdk::vfile::zip::ZipFileReader::~ZipFileReader  ) 
 


Member Function Documentation

int acdk::vfile::zip::ZipFileReader::available  )  [virtual]
 

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

Reimplemented from acdk::io::Reader.

void acdk::vfile::zip::ZipFileReader::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::Reader.

RString acdk::vfile::zip::ZipFileReader::getDeviceName  )  [virtual]
 

Returns:
the name of the device. Normally the filename

Implements acdk::io::Storage.

bool acdk::vfile::zip::ZipFileReader::isReadable  )  [inline, virtual]
 

Returns:
true if Storage is readable

Implements acdk::io::Storage.

bool acdk::vfile::zip::ZipFileReader::isWriteable  )  [inline, virtual]
 

Returns:
true if Storage is writable

Implements acdk::io::Storage.

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

Reimplemented from acdk::io::Reader.

bool acdk::vfile::zip::ZipFileReader::markSupported  )  [inline, virtual]
 

Reimplemented from acdk::io::Reader.

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

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

Reimplemented from acdk::io::Reader.

int acdk::vfile::zip::ZipFileReader::read IN(RbyteArray buffer,
int  offset = 0,
int  len = -1
[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::Reader.

int acdk::vfile::zip::ZipFileReader::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::Reader.

bool acdk::vfile::zip::ZipFileReader::ready  )  [virtual]
 

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

Reimplemented from acdk::io::Reader.

void acdk::vfile::zip::ZipFileReader::reset  )  [virtual]
 

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

Implements acdk::io::Reader.

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

Set stream position in this Reader to given position.

Returns:
the absolute position in this stream

Implements acdk::io::Reader.

jlong acdk::vfile::zip::ZipFileReader::skip jlong  n  )  [virtual]
 

Move forwart into the stream.

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

Implements acdk::io::Reader.


Member Data Documentation

int acdk::vfile::zip::ZipFileReader::_cpos [private]
 

acdk::io::RReader acdk::vfile::zip::ZipFileReader::_in [private]
 

RZipFileImpl acdk::vfile::zip::ZipFileReader::_zip [private]
 

 
Last modified 2005-05-08 18:33 by SYSTEM By Artefaktur, Ing. Bureau Kommer