cipher.init(Cipher.ENCRYPT_MODE, this.key, this.algParamSpec);
transferFileData(inputFile, outputFile, cipher);
}
protected void transferFileData(File inputFile, File outputFile, Cipher cipher) throws IOException {
InputStream is = new CipherInputStream(new BufferedInputStream(new FileInputStream(inputFile)), cipher);
OutputStream os = new BufferedOutputStream(new FileOutputStream(outputFile));
byte[] buffer = new byte[16384];
int read = -1;
while ((read = is.read(buffer)) != -1) {
os.write(buffer, 0, read);
}
os.close();
is.close();
}