00001 #ifndef ZIPOUTPUTSTREAM_H
00002 #define ZIPOUTPUTSTREAM_H
00003
00004 #include "zipios++/zipios-config.h"
00005
00006 #include "zipios++/meta-iostreams.h"
00007
00008 #include <string>
00009
00010 #include "zipios++/ziphead.h"
00011 #include "zipios++/zipoutputstreambuf.h"
00012
00013 namespace zipios {
00014
00015 using std::ifstream ;
00016
00020 class ZipOutputStream : public ostream {
00021 public:
00022
00026 explicit ZipOutputStream( ostream &os, streampos pos = 0 ) ;
00027
00031 explicit ZipOutputStream( const string &filename, streampos pos = 0 ) ;
00032
00037 void closeEntry() ;
00038
00043 void close() ;
00044
00049 void finish() ;
00050
00057 void putNextEntry( const ZipCDirEntry &entry ) ;
00058
00060 void setComment( const string &comment ) ;
00061
00063 void setLevel( int level ) ;
00064
00067 void setMethod( StorageMethod method ) ;
00068
00070 virtual ~ZipOutputStream() ;
00071
00072 private:
00073 ofstream *ofs ;
00074 ZipOutputStreambuf *ozf ;
00075 };
00076
00077 }
00078
00079 #endif
00080
00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102