while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
byte[] bytes = read(jarFile.getInputStream(entry));
if (entry.getName().endsWith(".class")) {
ClassReader cr = new ClassReader(bytes);
ClassNode cn = new ClassNode();
cr.accept(cn, 0);
contents.addClass(cn);
} else {
if (bytes.length > 0) {
if (bytes.length >= 4) {
byte ch1 = bytes[0];
byte ch2 = bytes[1];
byte ch3 = bytes[2];
byte ch4 = bytes[3];
int magic = ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
if (magic == 0xCAFEBABE) {
ClassReader cr = new ClassReader(bytes);
ClassNode cn = new ClassNode();
cr.accept(cn, 0);
contents.addClass(cn);
} else {
addResource(connection.getJarFileURL(), entry.getName(), bytes);
resCount++;