ZipArchiveEntry ze = null;
byte[] schemaFile = null;
while ((ze = zis.getNextZipEntry()) != null) {
if (SOLR_TEMPLATE_SCHEMA.equals(ze.getName())) {
schemaFile = createSchemaXML(getLDPathProgram(ldPathProgram), IOUtils.toByteArray(zis));
TarArchiveEntry te = new TarArchiveEntry(coreName + SOLR_SCHEMA);
te.setSize(schemaFile.length);
tarOutputStream.putArchiveEntry(te);
tarOutputStream.write(schemaFile);
tarOutputStream.closeArchiveEntry();
} else {
TarArchiveEntry te = new TarArchiveEntry(ze.getName().replaceAll(SOLR_TEMPLATE_NAME,
coreName));
te.setSize(ze.getSize());
tarOutputStream.putArchiveEntry(te);
tarOutputStream.write(IOUtils.toByteArray(zis));
tarOutputStream.closeArchiveEntry();
}