ZipOutputStream.cc

Go to the documentation of this file.
00001 // Copyright FreeHEP, 2005.
00002 
00003 #include <iostream>
00004 #include <ctime>
00005 #include <vector>
00006 
00007 #include "cheprep/ZipOutputStreamBuffer.h"
00008 #include "cheprep/ZipOutputStream.h"
00009 
00014 namespace cheprep {
00015 
00016     ZipOutputStream::ZipOutputStream(std::ostream& os) : std::ostream(0) {
00017         buffer = new ZipOutputStreamBuffer(os.rdbuf());
00018         
00019         init(buffer);
00020     }
00021     
00022     void ZipOutputStream::closeEntry() {
00023         buffer->closeEntry();
00024     }
00025 
00026 
00027     void ZipOutputStream::close() {
00028         buffer->close();
00029     }
00030 
00031     void ZipOutputStream::putNextEntry(const std::string& name, bool compress) {
00032         buffer->putNextEntry(name, compress);
00033     }
00034 
00035     void ZipOutputStream::setComment(const std::string& comment ) {
00036         buffer->setComment(comment);
00037     }
00038 
00039     ZipOutputStream::~ZipOutputStream() {
00040         close();
00041         delete buffer;
00042     }
00043 
00044 } // cheprep

Generated on Mon May 27 17:50:36 2013 for Geant4 by  doxygen 1.4.7