zipios::ZipOutputStream Class Reference

#include <zipoutputstream.h>

Inherits std::ostream.

List of all members.

Public Member Functions

void close ()
 Calls finish and if the ZipOutputStream was created with a filename as a parameter that file is closed as well.
void closeEntry ()
 Closes the current entry updates its header with the relevant size information and positions the stream write pointer for the next entry header.
void finish ()
 Closes the current entry (if one is open), then writes the Zip Central Directory Structure closing the ZipOutputStream.
void putNextEntry (const std::string &entryName)
void putNextEntry (const ZipCDirEntry &entry)
void setComment (const std::string &comment)
 Sets the global comment for the Zip archive.
void setLevel (int level)
 Sets the compression level to be used for subsequent entries.
void setMethod (StorageMethod method)
 Sets the compression method to be used.
 ZipOutputStream (const std::string &filename)
 ZipOutputStream constructor.
 ZipOutputStream (std::ostream &os)
 ZipOutputStream constructor.
virtual ~ZipOutputStream ()
 Destructor.

Detailed Description

ZipOutputStream is an ostream that writes the output to a zip file. The interface approximates the interface of the Java ZipOutputStream.

Definition at line 18 of file zipoutputstream.h.


Constructor & Destructor Documentation

zipios::ZipOutputStream::ZipOutputStream ( std::ostream &  os  )  [explicit]

ZipOutputStream constructor.

Parameters:
os ostream to which the compressed zip archive is written.

Definition at line 13 of file zipoutputstream.cpp.

zipios::ZipOutputStream::ZipOutputStream ( const std::string &  filename  )  [explicit]

ZipOutputStream constructor.

Parameters:
filename filename to write the zip archive to.

Definition at line 24 of file zipoutputstream.cpp.

zipios::ZipOutputStream::~ZipOutputStream (  )  [virtual]

Destructor.

Definition at line 74 of file zipoutputstream.cpp.


Member Function Documentation

void zipios::ZipOutputStream::close (  ) 

Calls finish and if the ZipOutputStream was created with a filename as a parameter that file is closed as well.

If the ZipOutputStream was created with an ostream as its first parameter nothing but the call to finish happens.

Definition at line 38 of file zipoutputstream.cpp.

References zipios::ZipOutputStreambuf::close().

Referenced by Base::ZipWriter::~ZipWriter().

void zipios::ZipOutputStream::closeEntry (  ) 

Closes the current entry updates its header with the relevant size information and positions the stream write pointer for the next entry header.

Puts the stream in EOF state. Call putNextEntry() to clear the EOF stream state flag.

Definition at line 33 of file zipoutputstream.cpp.

References zipios::ZipOutputStreambuf::closeEntry().

void zipios::ZipOutputStream::finish (  ) 

Closes the current entry (if one is open), then writes the Zip Central Directory Structure closing the ZipOutputStream.

The output stream that the zip archive is being written to is not closed.

Definition at line 45 of file zipoutputstream.cpp.

References zipios::ZipOutputStreambuf::finish().

void zipios::ZipOutputStream::putNextEntry ( const std::string &  entryName  ) 

Begins writing the next entry.

Definition at line 54 of file zipoutputstream.cpp.

References putNextEntry().

Referenced by putNextEntry().

void zipios::ZipOutputStream::putNextEntry ( const ZipCDirEntry entry  ) 

Begins writing the next entry.

Definition at line 50 of file zipoutputstream.cpp.

References zipios::ZipOutputStreambuf::putNextEntry().

Referenced by Base::ZipWriter::writeFiles().

void zipios::ZipOutputStream::setComment ( const std::string &  comment  ) 

Sets the global comment for the Zip archive.

Definition at line 59 of file zipoutputstream.cpp.

References zipios::ZipOutputStreambuf::setComment().

void zipios::ZipOutputStream::setLevel ( int  level  ) 

Sets the compression level to be used for subsequent entries.

Definition at line 64 of file zipoutputstream.cpp.

References zipios::ZipOutputStreambuf::setLevel().

void zipios::ZipOutputStream::setMethod ( StorageMethod  method  ) 

Sets the compression method to be used.

only STORED and DEFLATED are supported.

Definition at line 69 of file zipoutputstream.cpp.

References zipios::ZipOutputStreambuf::setMethod().


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:52 2011 for FreeCAD by  doxygen 1.6.1