Examples of unpack()


Examples of java.util.jar.Pack200.Unpacker.unpack()

        }

        Unpacker unpacker = Pack200.newUnpacker();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        JarOutputStream jar = new JarOutputStream(baos);
        unpacker.unpack(in, jar);
        jar.close();
        return new ByteArrayInputStream(baos.toByteArray());
    }

}
View Full Code Here

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

            archive.setDeflateHint(deflateHint);
        }
        if(logFileName != null) {
            archive.setLogFile(logFileName);
        }
        archive.unpack();
    }

    private static void printUsage() {
        System.out.println("Usage:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar");
        System.out.println("(For more information, run unpack200 --help)");
View Full Code Here

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

    public void testJustResourcesGZip() throws Exception {
       in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/JustResources.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("Just", "ResourcesGz.jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    // Test with an archive containing Harmony's SQL module, packed with -E1
    public void testWithSqlE1() throws Exception {
        in = Archive.class
View Full Code Here

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

    public void testWithSqlE1() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql-e1.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("sql-e1", ".jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    // Test with an archive containing Harmony's SQL module
    public void testWithSql() throws Exception {
        in = Archive.class
View Full Code Here

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

    public void testWithSql() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("sql", ".jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    // Test with an archive containing Harmony's Pack200 module, packed with -E1
    public void testWithPack200E1() throws Exception {
        in = Archive.class
View Full Code Here

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

    public void testWithPack200E1() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/pack200-e1.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("pack", "200-e1.jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    // Test with an archive containing Harmony's Pack200 module
    public void testWithPack200() throws Exception {
        in = Archive.class
View Full Code Here

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

    public void testWithPack200() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/pack200.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("pack", "200.jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    // Test with an archive containing Harmony's JNDI module
    public void testWithJNDIE1() throws Exception {
        in = Archive.class
View Full Code Here

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

    public void testWithJNDIE1() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/jndi-e1.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("jndi", "-e1.jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    // Test with an archive containing Annotations
    public void testWithAnnotations() throws Exception {
        in = Archive.class
View Full Code Here

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

    public void testWithAnnotations() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/annotations.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("ann", "otations.jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    // Test with an archive packed with the -E0 option
    public void testWithE0() throws Exception  {
        in = Archive.class
View Full Code Here

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

        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/simple-E0.pack.gz");
        out = new JarOutputStream(new FileOutputStream(File.createTempFile(
                "simpleE0", ".jar")));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
        try {
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.