com.funambol.syncclient.common
Class ZipTools
java.lang.Object
com.funambol.syncclient.common.ZipTools
public class ZipTools
- extends java.lang.Object
This class supplies some methods of usefullness for the
management of zip file.
In particular it supplies methods for the check and for
the extraction of zip file
- Version:
- $Id: ZipTools.java,v 1.3 2007-12-22 18:09:17 nichele Exp $
Method Summary |
static void |
extract(java.lang.String workingDirectory,
byte[] zipFile)
Extract the zip file rappresented by the given byte array. |
static void |
verifyZip(byte[] zipFile)
Verify if the given byte array represents a valid zip file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZipTools
public ZipTools()
extract
public static void extract(java.lang.String workingDirectory,
byte[] zipFile)
throws java.lang.Exception
- Extract the zip file rappresented by the given byte array.
- Parameters:
workingDirectory
- the directory in which the file
should be extractedzipFile
- the byte array that represents the zip
- Throws:
java.lang.Exception
- if error occurs or if the zip file is not valid
verifyZip
public static void verifyZip(byte[] zipFile)
throws java.io.IOException
- Verify if the given byte array represents a valid zip file.
Reads all the content of the zip file but it does not save it
- Parameters:
zipFile
- the byte array to verify
- Throws:
java.io.IOException
- if the byte array does not represent a valid zip file
Copyright © 2010 Funambol. All Rights Reserved.