#include <zipoutputstream.h>
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. More... | |
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. More... | |
void | finish () |
Closes the current entry (if one is open), then writes the Zip Central Directory Structure closing the ZipOutputStream. More... | |
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. More... | |
void | setLevel (int level) |
Sets the compression level to be used for subsequent entries. More... | |
void | setMethod (StorageMethod method) |
Sets the compression method to be used. More... | |
ZipOutputStream (const std::string &filename) | |
ZipOutputStream constructor. More... | |
ZipOutputStream (std::ostream &os) | |
ZipOutputStream constructor. More... | |
virtual | ~ZipOutputStream () |
Destructor. More... | |
Detailed Description
ZipOutputStream is an ostream that writes the output to a zip file. The interface approximates the interface of the Java ZipOutputStream.
Constructor & Destructor Documentation
◆ ZipOutputStream() [1/2]
|
explicit |
ZipOutputStream constructor.
- Parameters
-
os ostream to which the compressed zip archive is written.
◆ ZipOutputStream() [2/2]
|
explicit |
ZipOutputStream constructor.
- Parameters
-
filename filename to write the zip archive to.
◆ ~ZipOutputStream()
|
virtual |
Destructor.
Member Function Documentation
◆ close()
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.
References zipios::ZipOutputStreambuf::close().
Referenced by Base::ZipWriter::~ZipWriter().
◆ closeEntry()
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.
References zipios::ZipOutputStreambuf::closeEntry().
◆ finish()
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.
References zipios::ZipOutputStreambuf::finish().
Referenced by drafttaskpanels.task_polararray.TaskPanelPolarArray::accept(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::accept(), drafttaskpanels.task_circulararray.TaskPanelCircularArray::accept(), draftguitools.gui_split.Split::action(), draftguitools.gui_splines.BSpline::action(), draftguitools.gui_beziers.BezCurve::action(), draftguitools.gui_lines.Line::action(), draftguitools.gui_polygons.Polygon::action(), draftguitools.gui_subelements.SubelementHighlight::action(), draftguitools.gui_rotate.Rotate::action(), draftguitools.gui_fillets.Fillet::action(), draftguitools.gui_move.Move::action(), draftguitools.gui_texts.Text::action(), draftguitools.gui_mirror.Mirror::action(), draftguitools.gui_stretch.Stretch::action(), draftguitools.gui_scale.Scale::action(), draftguitools.gui_arcs.Arc::action(), draftguitools.gui_offset.Offset::action(), draftguitools.gui_ellipses.Ellipse::action(), draftguitools.gui_rectangles.Rectangle::action(), draftguitools.gui_shapestrings.ShapeString::action(), draftguitools.gui_labels.Label::action(), draftguitools.gui_selectplane.Draft_SelectPlane::action(), draftguitools.gui_trimex.Trimex::action(), draftguitools.gui_beziers.CubicBezCurve::action(), draftguitools.gui_dimensions.Dimension::action(), draftguitools.gui_wire2spline.WireToBSpline::Activated(), draftguitools.gui_subelements.SubelementHighlight::Activated(), draftguitools.gui_dimensions.Dimension::Activated(), draftguitools.gui_edit.Edit::Activated(), draftguitools.gui_selectplane.Draft_SelectPlane::checkSelection(), DraftGui.DraftToolBar::checkSpecialChars(), draftguitools.gui_points.Point::click(), draftguitools.gui_labels.Label::create(), draftguitools.gui_ellipses.Ellipse::createObject(), draftguitools.gui_rectangles.Rectangle::createObject(), draftguitools.gui_texts.Text::createObject(), draftguitools.gui_shapestrings.ShapeString::createObject(), draftguitools.gui_stretch.Stretch::doStretch(), draftguitools.gui_arcs.Arc::drawArc(), draftguitools.gui_polygons.Polygon::drawPolygon(), DraftGui.DraftToolBar::escape(), draftguitools.gui_edit.Edit::keyPressed(), draftguitools.gui_dimensions.Dimension::numericInput(), draftguitools.gui_fillets.Fillet::numericRadius(), draftguitools.gui_offset.Offset::numericRadius(), draftguitools.gui_rotate.Rotate::numericRadius(), draftguitools.gui_trimex.Trimex::numericRadius(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAlign(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAuto(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickCenter(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickFront(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickMove(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickPrevious(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickSide(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickTop(), draftguitools.gui_subelements.SubelementHighlight::proceed(), draftguitools.gui_facebinders.Facebinder::proceed(), draftguitools.gui_downgrade.Downgrade::proceed(), draftguitools.gui_upgrade.Upgrade::proceed(), draftguitools.gui_draft2sketch.Draft2Sketch::proceed(), draftguitools.gui_shape2dview.Shape2DView::proceed(), draftguitools.gui_join.Join::proceed(), draftguitools.gui_array_simple.Array::proceed(), draftguitools.gui_clone.Clone::proceed(), draftguitools.gui_split.Split::proceed(), draftguitools.gui_trimex.Trimex::proceed(), draftguitools.gui_pointarray.PointArray::proceed(), draftguitools.gui_patharray.PathArray::proceed(), draftguitools.gui_edit.Edit::proceed(), draftguitools.gui_selectplane.Draft_SelectPlane::reject(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::reject(), drafttaskpanels.task_polararray.TaskPanelPolarArray::reject(), drafttaskpanels.task_circulararray.TaskPanelCircularArray::reject(), and draftguitools.gui_edit.Edit::setTrackers().
◆ putNextEntry() [1/2]
void zipios::ZipOutputStream::putNextEntry | ( | const std::string & | entryName | ) |
◆ putNextEntry() [2/2]
void zipios::ZipOutputStream::putNextEntry | ( | const ZipCDirEntry & | entry | ) |
Begins writing the next entry.
References zipios::ZipOutputStreambuf::putNextEntry().
Referenced by Base::ZipWriter::writeFiles().
◆ setComment()
void zipios::ZipOutputStream::setComment | ( | const std::string & | comment | ) |
Sets the global comment for the Zip archive.
References zipios::ZipOutputStreambuf::setComment().
◆ setLevel()
void zipios::ZipOutputStream::setLevel | ( | int | level | ) |
Sets the compression level to be used for subsequent entries.
References zipios::ZipOutputStreambuf::setLevel().
◆ setMethod()
void zipios::ZipOutputStream::setMethod | ( | StorageMethod | method | ) |
Sets the compression method to be used.
only STORED and DEFLATED are supported.
References zipios::ZipOutputStreambuf::setMethod().
The documentation for this class was generated from the following files:
- src/zipios++/zipoutputstream.h
- src/zipios++/zipoutputstream.cpp