i am unzipping a folder using the following code:
var zipFilePath="D:\\readytodelete\\folder\\Test.zip";
var unzipPath="D:\\readytodelete\\folder";
var zipFile = null;
try {
zipFile = new java.util.zip.ZipFile(zipFilePath);
var entries = zipFile.entries();
var bytes = new Packages.java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
while (entries.hasMoreElements()) {
var zipEntry = new java.util.zip.ZipEntry(entries.nextElement());
var fileFromZipEntry = new java.io.File(unzipPath + java.io.File.separator + zipEntry.getName());
//zipEntry reports / as separator, even on Windows, so we're not using java.io.File.separator in the following test
if (StringUtils.endsWith(zipEntry.getName(), '/')) {
fileFromZipEntry.mkdirs();
continue;
} else {
var inputStream = null;
var outputStream = null;
var length = -1;
try {
inputStream = zipFile.getInputStream(zipEntry);
outputStream = new java.io.FileOutputStream(fileFromZipEntry);
while ((length = inputStream.read(bytes)) >= 0) {
outputStream.write(bytes, 0, length);
}
} finally {
if (inputStream !== null) {
inputStream.close();
inputStream = null;
}
if (outputStream !== null) {
outputStream.close();
outputStream = null;
}
}
}
}
} catch (err) {
qie.error('Failed to unzip file \'' + zipFilePath + '\': ' + err);
} finally {
if (zipFile !== null) {
zipFile.close();
zipFile = null;
}
}
and this code is working fine now i want to unzip a foder which need passcode before to unzip so what are the required modification i need to do in mapping script?
please send me the requierd mapping script.
thanx in advance.