public class ZipUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
ZipUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
zip(File input,
File output,
String entryName)
Zip the file content.
|
static File |
zipDocument(GCubeItem document)
Zip the document into a tmp zip file.
|
static File |
zipDocument(GCubeItem document,
boolean skipRoot)
Zip the document into a tmp zip file.
|
static File |
zipFolder(WorkspaceFolder folder)
Zip the folder content into a tmp zip file.
|
static File |
zipFolder(WorkspaceFolder folder,
boolean skipRoot,
List<String> idsToExclude)
Zip the folder content into a tmp zip file.
|
static File |
zipTimeSeries(TimeSeries ts) |
static File |
zipTimeSeries(TimeSeries ts,
boolean skipRoot) |
protected static File |
zipWorkspaceItem(List<WorkspaceItem> items,
List<String> idsToExclude) |
protected static File |
zipWorkspaceItem(WorkspaceItem workspaceItem) |
protected static File |
zipWorkspaceItem(WorkspaceItem workspaceItem,
boolean skipRoot) |
protected static File |
zipWorkspaceItem(WorkspaceItem workspaceItem,
boolean skipRoot,
List<String> idsToExclude) |
static File |
zipWorkspaceItems(List<WorkspaceItem> items,
List<String> idsToExclude)
Zip a list of items
|
public static File zipFolder(WorkspaceFolder folder) throws IOException, InternalErrorException
folder - the folder to be compressed.IOException - if an error occurs.InternalErrorException - if an error occurs.public static File zipDocument(GCubeItem document) throws IOException, InternalErrorException
document - the document to compress.IOException - if an error occurs.InternalErrorException - if an error occurs.public static File zipTimeSeries(TimeSeries ts) throws IOException, InternalErrorException
ts - the time series to zip.IOException - if an error occurs.InternalErrorException - if an error occurs.public static File zipFolder(WorkspaceFolder folder, boolean skipRoot, List<String> idsToExclude) throws IOException, InternalErrorException
folder - the folder to be compressed.skipRoot - idsToExclude - IOExceptionInternalErrorException - if an error occurs.public static File zipWorkspaceItems(List<WorkspaceItem> items, List<String> idsToExclude) throws IOException, InternalErrorException
items - the items to be compressed.idsToExclude - IOExceptionInternalErrorExceptionpublic static File zipDocument(GCubeItem document, boolean skipRoot) throws IOException, InternalErrorException
document - the document to compress.skipRoot - if the root has to be skippedIOException - if an error occurs.InternalErrorException - if an error occurs.public static File zipTimeSeries(TimeSeries ts, boolean skipRoot) throws IOException, InternalErrorException
ts - the time series to zip.skipRoot - if the root has to be skippedIOException - if an error occurs.InternalErrorException - if an error occurs.protected static File zipWorkspaceItem(WorkspaceItem workspaceItem) throws InternalErrorException, IOException
InternalErrorExceptionIOExceptionprotected static File zipWorkspaceItem(WorkspaceItem workspaceItem, boolean skipRoot) throws InternalErrorException, IOException
InternalErrorExceptionIOExceptionprotected static File zipWorkspaceItem(WorkspaceItem workspaceItem, boolean skipRoot, List<String> idsToExclude) throws InternalErrorException, IOException
InternalErrorExceptionIOExceptionprotected static File zipWorkspaceItem(List<WorkspaceItem> items, List<String> idsToExclude) throws InternalErrorException, IOException
InternalErrorExceptionIOExceptionpublic static void zip(File input, File output, String entryName) throws IOException
input - the input file content.output - the output file.entryName - the zip entry name.IOException - if an error occurs.Copyright © 2020. All Rights Reserved.