int manifestBegin = manifestStr.indexOf("<xmi");
configStr = configStr.substring(0, index) + manifestStr.substring(manifestBegin) + "</VDB>";
FileUtils.write(configStr.getBytes(), config);
manifest.delete();
}
transformConfig(config, "/vdb.xsl", new StreamResult(new File(metainf, "vdb.xml")));
config.delete();
FileOutputStream out = new FileOutputStream(new File(file.getParent(), fileName + "_70.vdb"));
ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(out));
int parentLength = dir.getPath().length();
addDirectory(dir, zos, parentLength);
zos.close();
} finally {
FileUtils.removeDirectoryAndChildren(dir);
}
} else if (ext.endsWith("xml") || ext.endsWith("def")){
File parent = file.getParentFile();
transformConfig(file, "/vdb.xsl", new StreamResult(new File(parent, fileName + "-vdb.xml")));
} else {
System.err.println(fullName + " is not a vdb or xml file. Run with no arguments for help."); //$NON-NLS-1$
System.exit(-1);
}
}