@Override public void closeExportWriter() { try { this.encrypter.close(); } catch (IOException ioe) { throw new RuntimeException(ioe); } } }
/** * Zip + encrypt one "inFile" to one "outZipFile" using "password". */ public static void zipAndEncrypt(File inFile, File outFile, String password, AESEncrypter encrypter) throws IOException { AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter); try { enc.add(inFile, password); } finally { enc.close(); } }
/** * Zip + encrypt one "inFile" to one "outZipFile" using "password". */ public static void zipAndEncrypt(File inFile, File outFile, String password, AESEncrypter encrypter) throws IOException { AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter); try { enc.add(inFile, password); } finally { enc.close(); } }
/** * Encrypt all files from an existing zip to one new "zipOutFile" using "password". */ public static void zipAndEncryptAll(File inZipFile, File outFile, String password, AESEncrypter encrypter) throws IOException { AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter); try { enc.addAll(inZipFile, password); } finally { enc.close(); } }
/** * Encrypt all files from an existing zip to one new "zipOutFile" using "password". */ public static void zipAndEncryptAll(File inZipFile, File outFile, String password, AESEncrypter encrypter) throws IOException { AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter); try { enc.addAll(inZipFile, password); } finally { enc.close(); } }