ZipInputStreambuf is a zip input streambuf filter. More...
#include <zipinputstreambuf.h>
Public Member Functions | |
void | close () |
Closes the streambuf. | |
void | closeEntry () |
Closes the current entry, and positions the stream read pointer at the beginning of the next entry (if there is one). | |
ConstEntryPointer | getNextEntry () |
Opens the next entry in the zip archive and returns a const pointer to a FileEntry object for the entry. | |
ZipInputStreambuf (streambuf *inbuf, int s_pos=-1, bool del_inbuf=false) | |
ZipInputStreambuf constructor. | |
virtual | ~ZipInputStreambuf () |
Destructor. | |
Protected Member Functions | |
virtual int | underflow () |
ZipInputStreambuf is a zip input streambuf filter.
Definition at line 18 of file zipinputstreambuf.h.
zipios::ZipInputStreambuf::ZipInputStreambuf | ( | streambuf * | inbuf, | |
int | s_pos = -1 , |
|||
bool | del_inbuf = false | |||
) | [explicit] |
ZipInputStreambuf constructor.
inbuf | the streambuf to use for input. | |
s_pos | a position to reset the inbuf to before reading. Specify -1 to read from the current position. | |
del_inbuf | if true is specified inbuf will be deleted, when the ZipInputStreambuf is destructed. |
Definition at line 18 of file zipinputstreambuf.cpp.
References getNextEntry().
zipios::ZipInputStreambuf::~ZipInputStreambuf | ( | ) | [virtual] |
Destructor.
Definition at line 82 of file zipinputstreambuf.cpp.
void zipios::ZipInputStreambuf::close | ( | ) |
Closes the streambuf.
Definition at line 42 of file zipinputstreambuf.cpp.
Referenced by zipios::ZipInputStream::close().
void zipios::ZipInputStreambuf::closeEntry | ( | ) |
Closes the current entry, and positions the stream read pointer at the beginning of the next entry (if there is one).
Definition at line 29 of file zipinputstreambuf.cpp.
References zipios::FilterInputStreambuf::_inbuf, and zipios::ZipLocalEntry::getCompressedSize().
Referenced by zipios::ZipInputStream::closeEntry(), and getNextEntry().
ConstEntryPointer zipios::ZipInputStreambuf::getNextEntry | ( | ) |
Opens the next entry in the zip archive and returns a const pointer to a FileEntry object for the entry.
Definition at line 45 of file zipinputstreambuf.cpp.
References zipios::FilterInputStreambuf::_inbuf, zipios::InflateInputStreambuf::_outvec, zipios::InflateInputStreambuf::_outvecsize, closeEntry(), zipios::DEFLATED, zipios::InflateInputStreambuf::reset(), and zipios::STORED.
Referenced by zipios::ZipInputStream::getNextEntry(), and ZipInputStreambuf().
int zipios::ZipInputStreambuf::underflow | ( | ) | [protected, virtual] |
Reimplemented from zipios::InflateInputStreambuf.
Definition at line 86 of file zipinputstreambuf.cpp.
References zipios::FilterInputStreambuf::_inbuf, zipios::InflateInputStreambuf::_outvec, zipios::InflateInputStreambuf::_outvecsize, zipios::DEFLATED, zipios::ZipLocalEntry::getMethod(), zipios::min(), and zipios::InflateInputStreambuf::underflow().