.TH "zipios::ZipFile" 3 "Tue May 9 2017" "Zipios++" \" -*- nroff -*- .ad l .nh .SH NAME zipios::ZipFile .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBzipios::FileCollection\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBZipFile\fP ()" .br .RI "Default constructor\&. " .ti -1c .RI "\fBZipFile\fP (const string &name, int s_off=0, int e_off=0)" .br .RI "Constructor\&. " .ti -1c .RI "virtual \fBFileCollection\fP * \fBclone\fP () const" .br .RI "Create a heap allocated clone of the object this method is called for\&. " .ti -1c .RI "virtual \fB~ZipFile\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "virtual void \fBclose\fP ()" .br .RI "Closes the \fBFileCollection\fP\&. " .ti -1c .RI "virtual istream * \fBgetInputStream\fP (const \fBConstEntryPointer\fP &entry)" .br .ti -1c .RI "virtual istream * \fBgetInputStream\fP (const string &entry_name, MatchPath matchpath=MATCH)" .br .RI "Returns a pointer to an opened istream for the specified entry name\&. " .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBZipFile\fP \fBopenEmbeddedZipFile\fP (const string &name)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP \fBZipFile\fP is a \fBFileCollection\fP, where the files are stored in a \&.zip file\&. .PP Definition at line 20 of file zipfile\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "zipios::ZipFile::ZipFile ()\fC [inline]\fP" .PP Default constructor\&. .PP Definition at line 37 of file zipfile\&.h\&. .SS "zipios::ZipFile::ZipFile (const string & name, int s_off = \fC0\fP, int e_off = \fC0\fP)\fC [explicit]\fP" .PP Constructor\&. Opens the zip file name\&. If the zip 'file' is embedded in a file that contains other data, e\&.g\&. a binary program, the offset of the zip file start and end must be specified\&. .PP \fBParameters:\fP .RS 4 \fIname\fP The filename of the zip file to open\&. .br \fIs_off\fP Offset relative to the start of the file, that indicates the beginning of the zip file\&. .br \fIe_off\fP Offset relative to the end of the file, that indicates the end of the zip file\&. The offset is a positive number, even though the offset is towards the beginning of the file\&. .RE .PP \fBExceptions:\fP .RS 4 \fIFColException\fP Thrown if the specified file name is not a valid zip archive\&. .br \fI\fBIOException\fP\fP Thrown if an I/O problem is encountered, while the directory of the specified zip archive is being read\&. .RE .PP .PP Definition at line 30 of file zipfile\&.cpp\&. .SS "zipios::ZipFile::~ZipFile ()\fC [virtual]\fP" .PP Destructor\&. .PP Definition at line 46 of file zipfile\&.cpp\&. .SH "Member Function Documentation" .PP .SS "\fBFileCollection\fP * zipios::ZipFile::clone () const\fC [virtual]\fP" .PP Create a heap allocated clone of the object this method is called for\&. The caller is responsible for deallocating the clone when he is done with it\&. .PP \fBReturns:\fP .RS 4 A heap allocated copy of the object this method is called for\&. .RE .PP .PP Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 41 of file zipfile\&.cpp\&. .SS "void zipios::ZipFile::close ()\fC [virtual]\fP" .PP Closes the \fBFileCollection\fP\&. .PP Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 50 of file zipfile\&.cpp\&. .SS "istream * zipios::ZipFile::getInputStream (const \fBConstEntryPointer\fP & entry)\fC [virtual]\fP" Returns a pointer to an opened istream for the specified \fBFileEntry\fP\&. It is the callers responsibility to delete the stream when he is done with it\&. Returns 0, if there is no such \fBFileEntry\fP in the \fBFileCollection\fP\&. .PP \fBParameters:\fP .RS 4 \fIentry\fP A ConstEntryPointer to the \fBFileEntry\fP to get an istream to\&. .RE .PP \fBReturns:\fP .RS 4 an open istream for the specified entry\&. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 55 of file zipfile\&.cpp\&. .SS "istream * zipios::ZipFile::getInputStream (const string & entry_name, MatchPath matchpath = \fCMATCH\fP)\fC [virtual]\fP" .PP Returns a pointer to an opened istream for the specified entry name\&. It is the callers responsibility to delete the stream when he is done with it\&. Returns 0, if there is no entry with the specified name in the \fBFileCollection\fP\&. .PP \fBParameters:\fP .RS 4 \fImatchpath\fP Speficy MATCH, if the path should match as well, specify IGNORE, if the path should be ignored\&. .RE .PP \fBReturns:\fP .RS 4 an open istream for the specified entry\&. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 61 of file zipfile\&.cpp\&. .SS "\fBZipFile\fP zipios::ZipFile::openEmbeddedZipFile (const string & name)\fC [static]\fP" Opens a Zip archive embedded in another file, by writing the zip archive to the end of the file followed by the start offset of the zip file\&. The offset must be written in zip-file byte-order (little endian)\&. The program appendzip, which is part of the Zipios++ distribution can be used to append a Zip archive to a file, e\&.g\&. a binary program\&. .PP \fBExceptions:\fP .RS 4 \fIFColException\fP Thrown if the specified file name is not a valid zip archive\&. .br \fI\fBIOException\fP\fP Thrown if an I/O problem is encountered, while the directory of the specified zip archive is being read\&. .RE .PP .PP Definition at line 19 of file zipfile\&.cpp\&. .SH "Author" .PP Generated automatically by Doxygen for Zipios++ from the source code\&.