2 import org.ibex.classgen.*;
5 import java.util.zip.*;
7 public class OptimizeCore {
8 public static void main(String[] s) throws Exception {
9 File outf = new File(s[0] + "-");
10 File inf = new File(s[0]);
11 ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outf));
12 ZipInputStream zis = new ZipInputStream(new FileInputStream(inf));
14 ZipEntry ze = zis.getNextEntry();
17 String name = ze.getName();
18 if (!name.endsWith(".class")) {
19 byte b[] = new byte[1024];
21 int numread = zis.read(b, 0, b.length);
22 if (numread==-1) break;
23 out.write(b, 0, numread);
27 System.out.println("updating " + name.substring(0, name.length()-6).replace('$','.').replace('/','.'));
28 ClassFile cf = new ClassFile(new DataInputStream(zis));