Package org.apache.harmony.pack200

Examples of org.apache.harmony.pack200.Archive.pack()


                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
        file = File.createTempFile("helloworld", ".pack.gz");
        out = new FileOutputStream(file);
        Archive archive = new Archive(in, out, true);
        archive.setSegmentLimit(0);
        archive.pack();
        in.close();
        out.close();

        in = new JarFile(new File(Archive.class.getResource(
                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
View Full Code Here


                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
        file = File.createTempFile("helloworld", ".pack.gz");
        out = new FileOutputStream(file);
        archive = new Archive(in, out, true);
        archive.setSegmentLimit(-1);
        archive.pack();
        in.close();
        out.close();

        in = new JarFile(new File(Archive.class.getResource(
                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
View Full Code Here

                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
        file = File.createTempFile("helloworld", ".pack.gz");
        out = new FileOutputStream(file);
        archive = new Archive(in, out, true);
        archive.setSegmentLimit(5000);
        archive.pack();
        in.close();
        out.close();
    }

    public void testStripDebug() throws IOException, Pack200Exception, URISyntaxException {
View Full Code Here

                .getResource("/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI()));
        file = File.createTempFile("sql", ".pack");
        out = new FileOutputStream(file);
        Archive archive = new Archive(in, out, false);
        archive.stripDebugAttributes();
        archive.pack();
        in.close();
        out.close();

        // now unpack
        InputStream in2 = new FileInputStream(file);
View Full Code Here

        in = new JarFile(f1);
        file = File.createTempFile("jndiE0", ".pack");
        out = new FileOutputStream(file);
        Archive archive = new Archive(in, out, false);
        archive.setEffort(0);
        archive.pack();
        in.close();
        out.close();
        compareFiles(new JarFile(f1), new JarFile(file));

    }
View Full Code Here

                        .getResourceAsStream("/org/apache/harmony/pack200/tests/hw.jar"));
        file = File.createTempFile("helloworld", ".pack.gz");
        out = new FileOutputStream(file);
        archive = new Archive(in, out, true);
        archive.setSegmentLimit(-1);
        archive.pack();
        in.close();
        out.close();

        in = new JarInputStream(
                Archive.class
View Full Code Here

                        .getResourceAsStream("/org/apache/harmony/pack200/tests/hw.jar"));
        file = File.createTempFile("helloworld", ".pack.gz");
        out = new FileOutputStream(file);
        archive = new Archive(in, out, true);
        archive.setSegmentLimit(5000);
        archive.pack();
        in.close();
        out.close();
    }

    public void testStripDebug() throws IOException, Pack200Exception, URISyntaxException {
View Full Code Here

                .getResourceAsStream("/org/apache/harmony/pack200/tests/sqlUnpacked.jar"));
        file = File.createTempFile("sql", ".pack");
        out = new FileOutputStream(file);
        Archive archive = new Archive(in, out, false);
        archive.stripDebugAttributes();
        archive.pack();
        in.close();
        out.close();

        // now unpack
        InputStream in2 = new FileInputStream(file);
View Full Code Here

                        .getResourceAsStream("/org/apache/harmony/pack200/tests/hw.jar"));
        file = File.createTempFile("helloworld", ".pack.gz");
        out = new FileOutputStream(file);
        Archive archive = new Archive(in, out, true);
        archive.setSegmentLimit(0);
        archive.pack();
        in.close();
        out.close();

        in = new JarInputStream(
                Archive.class
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.