shared items

Friday, September 5, 2008

IPworks to zip

protected void encryptWithIPWorks(File[] files, File fSendZip, String sPassword) throws IPWorksZipException, IOException
{
Zip zip = new Zip();
zip.setArchiveFile(fSendZip.getAbsolutePath());
System.out.println("Encrypting to strength: " + zipEncrypt);
zip.setEncryptionAlgorithm(zipEncrypt);
zip.setPassword(sPassword);

for ( int i = 0; i < files.length; ++i )
{
zip.includeFiles(files[i].getCanonicalPath());
}
zip.compress();

}

No comments: