org.gcube.portlets.user.homelibrary.util.zip
Class ZipUtil
java.lang.Object
org.gcube.portlets.user.homelibrary.util.zip.ZipUtil
public class ZipUtil
- extends Object
- Author:
- Federico De Faveri defaveri@isti.cnr.it
|
Field Summary |
protected static org.apache.log4j.Logger |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.log4j.Logger logger
ZipUtil
public ZipUtil()
zipFolder
public static File zipFolder(WorkspaceFolder folder)
throws IOException,
InternalErrorException
- Zip the folder content into a tmp zip file.
- Parameters:
folder - the folder to be compressed.
- Returns:
- the zip file.
- Throws:
IOException - if an error occurs.
InternalErrorException - if an error occurs.
zipDocument
public static File zipDocument(Document document)
throws IOException,
InternalErrorException
- Zip the document into a tmp zip file.
- Parameters:
document - the document to compress.
- Returns:
- the zip tmp file.
- Throws:
IOException - if an error occurs.
InternalErrorException - if an error occurs.
zipTimeSeries
public static File zipTimeSeries(TimeSeries ts)
throws IOException,
InternalErrorException
- Parameters:
ts - the time series to zip.
- Returns:
- the zipped file.
- Throws:
IOException - if an error occurs.
InternalErrorException - if an error occurs.
zipAquaMapsItem
public static File zipAquaMapsItem(AquaMapsItem aquaMapsItem)
throws IOException,
InternalErrorException
- Parameters:
aquaMapsItem - the item to zip.
- Returns:
- the zipped item.
- Throws:
IOException - if an error occurs.
InternalErrorException - if an error occurs.
zipWorkspaceItem
protected static File zipWorkspaceItem(WorkspaceItem workspaceItem)
throws InternalErrorException,
IOException
- Throws:
InternalErrorException
IOException
zip
public static void zip(File input,
File output,
String entryName)
throws IOException
- Zip the file content.
- Parameters:
input - the input file content.output - the output file.entryName - the zip entry name.
- Throws:
IOException - if an error occurs.
Copyright © 2013. All Rights Reserved.