{
ZipInputStream zip = new ZipInputStream(
new FileInputStream(
indir.getPath() + "/" + files[i]));
ProcessArchive pa = new ProcessArchive(zip);
String xml = convertPar( pa );
// Create new process archive in designated output directory
ZipOutputStream zippo = new ZipOutputStream(
new FileOutputStream(
outdir.getPath() + "/" + files[i] ));
// Copy all non-pdl entries and insert new pdl
for (Iterator iter = pa.getEntries().keySet().iterator(); iter.hasNext(); )
{
String name = (String) iter.next();
zippo.putNextEntry( new ZipEntry( name ) );
if ("processdefinition.xml".equalsIgnoreCase(name))
{
zippo.write( xml.getBytes( ) );
}
else
{
zippo.write( pa.getEntry(name) );
}
zippo.closeEntry();
}