org.gcube.portlets.user.homelibrary.util.zip
Class UnzipUtil
java.lang.Object
org.gcube.portlets.user.homelibrary.util.zip.UnzipUtil
public class UnzipUtil
- 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
UnzipUtil
public UnzipUtil()
unzip
public static void unzip(WorkspaceFolder destinationFolder,
InputStream is,
String zipName)
throws IOException
- Unzip the specified file into the specified workspace.
- Parameters:
destinationFolder - the destination workspace.is - the zip input stream.zipName - the zip name.
- Throws:
IOException - if an error occurs.
unzip
public static void unzip(InputStream is,
OutputStream os)
throws Exception
- Unzip the specified stream.
- Parameters:
is - the input stream.os - the destination stream.
- Throws:
Exception - if an error occurs.
unzipToTmp
public static InputStream unzipToTmp(InputStream is)
throws Exception
- Parameters:
is - the zipped input stream.
- Returns:
- the resutil output stream.
- Throws:
Exception - if an error occurs.
Copyright © 2013. All Rights Reserved.