ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZipOutputStream.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ZipOutputStream.cc
1 // Copyright FreeHEP, 2005.
2 
3 #include <iostream>
4 #include <ctime>
5 #include <vector>
6 
9 
13 namespace cheprep {
14 
15  ZipOutputStream::ZipOutputStream(std::ostream& os) : std::ostream(0) {
16  buffer = new ZipOutputStreamBuffer(os.rdbuf());
17 
18  init(buffer);
19  }
20 
22  buffer->closeEntry();
23  }
24 
25 
27  buffer->close();
28  }
29 
30  void ZipOutputStream::putNextEntry(const std::string& name, bool compress) {
31  buffer->putNextEntry(name, compress);
32  }
33 
34  void ZipOutputStream::setComment(const std::string& comment ) {
35  buffer->setComment(comment);
36  }
37 
39  close();
40  delete buffer;
41  }
42 
43 } // cheprep