ZipFile zip = null;
try {
zip = new ZipFile(jarFile);
Enumeration files = zip.getEntries();
while (files.hasMoreElements()) {
ZipEntry nextEntry = (ZipEntry) files.nextElement();
if (nextEntry == null || nextEntry.isDirectory()) {
continue;
}
String name = nextEntry.getName();
if (name.equals("META-INF/tobago-theme.xml") || name.equals("META-INF/tobago-config.xml")) {
XmlStreamReader xsr = null;
try {
StringWriter stringWriter = new StringWriter();
xsr = ReaderFactory.newXmlReader(zip.getInputStream(nextEntry));