1 #ifndef ZIPINPUTSTREAM_H
2 #define ZIPINPUTSTREAM_H
4 #include "zipios++/zipios-config.h"
6 #include "zipios++/meta-iostreams.h"
9 #include "zipios++/ziphead.h"
10 #include "zipios++/zipinputstreambuf.h"
16 /** \anchor ZipInputStream_anchor
17 ZipInputStream is an istream that gets it's input from a zip file. The
18 interface approximates the interface of the Java
20 class ZipInputStream : public istream {
23 /** ZipInputStream constructor.
24 @param is istream from which the compressed zip archive can be read.
25 @param pos position to reposition the istream to before reading. */
26 explicit ZipInputStream( istream &is, streampos pos = 0 ) ;
28 /** ZipInputStream constructor.
29 @filename filename of a valid zip file.
30 @param pos position to reposition the istream to before reading. */
31 explicit ZipInputStream( const string &filename, streampos pos = 0 ) ;
34 /** Closes the current entry, and positions the stream read pointer at
35 the beginning of the next entry (if there is one). */
38 /** Closes the istream. */
41 // ZipLocalEntry *createZipCDirEntry( const string &name ) ;
43 /** \anchor ZipInputStream_getnextentry_anchor
44 Opens the next entry in the zip archive and returns a const pointer to a
45 FileEntry object for the entry. For new instances this method has to be
46 called once before you can read from the first entry.
47 @return a const FileEntry * containing information about the (now) current
50 ConstEntryPointer getNextEntry() ;
53 virtual ~ZipInputStream() ;
57 ZipInputStreambuf *izf ;
59 /** Copy-constructor is private to prevent copying. */
60 ZipInputStream( const ZipInputStream &src ) ;
62 /** Copy-assignment operator is private to prevent copying. */
63 const ZipInputStream &operator= ( const ZipInputStream &src ) ;
72 Header file that defines ZipInputStream.
76 Zipios++ - a small C++ library that provides easy access to .zip files.
77 Copyright (C) 2000 Thomas Søndergaard
79 This library is free software; you can redistribute it and/or
80 modify it under the terms of the GNU Lesser General Public
81 License as published by the Free Software Foundation; either
82 version 2 of the License, or (at your option) any later version.
84 This library is distributed in the hope that it will be useful,
85 but WITHOUT ANY WARRANTY; without even the implied warranty of
86 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
87 Lesser General Public License for more details.
89 You should have received a copy of the GNU Lesser General Public
90 License along with this library; if not, write to the Free Software
91 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA