public class Zipper extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static org.bonitasoft.web.designer.controller.export.Zipper.PathPredicate |
ALL_DIRECTORIES |
static org.bonitasoft.web.designer.controller.export.Zipper.FilePredicate |
ALL_FILES |
| Constructor and Description |
|---|
Zipper(OutputStream destStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDirectoryToZip(Path sourceDirectory,
org.bonitasoft.web.designer.controller.export.Zipper.PathPredicate directoryPredicate,
org.bonitasoft.web.designer.controller.export.Zipper.FilePredicate filePredicate,
String destinationDirectoryName)
Adds the contents of the given source directory to the zip, by accepting only directories and files accepted by the
given predicates.
|
void |
addToZip(byte[] bytes,
String destFilename) |
void |
addToZip(Path path,
String destFilename) |
void |
close() |
public static final org.bonitasoft.web.designer.controller.export.Zipper.PathPredicate ALL_DIRECTORIES
public static final org.bonitasoft.web.designer.controller.export.Zipper.FilePredicate ALL_FILES
public Zipper(OutputStream destStream)
public void addToZip(byte[] bytes,
String destFilename)
throws IOException
IOExceptionpublic void addToZip(Path path, String destFilename) throws IOException
IOExceptionpublic void addDirectoryToZip(Path sourceDirectory, org.bonitasoft.web.designer.controller.export.Zipper.PathPredicate directoryPredicate, org.bonitasoft.web.designer.controller.export.Zipper.FilePredicate filePredicate, String destinationDirectoryName) throws IOException
sourceDirectory - the source directorydirectoryPredicate - the predicate used to accept directoriesfilePredicate - the predicate used to accept filesdestinationDirectoryName - the name of the target directory, in the zip, where all the files must be added.IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOExceptionCopyright © 2021. All rights reserved.