// file with JarBuilder.
JarBuilder builder = new JarBuilder(null);
for (int i = 0; i < files.size(); ++i) {
String file = files.get(i);
if (file.equals(CatalogUtil.CATALOG_FILENAME)) {
builder.addEntry(CatalogUtil.CATALOG_FILENAME,
catalog.serialize().getBytes());
}
else {
builder.addEntry(file, bytes.get(i));
}