Package com.sun.tools.javac.util

Examples of com.sun.tools.javac.util.JavacFileManager$Archive


    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();
    }
View Full Code Here


    // Test with an archive containing Harmony's SQL module, packed with -E1
    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();
    }
View Full Code Here

    // Test with an archive containing Harmony's SQL module
    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();
    }
View Full Code Here

    // Test with an archive containing Harmony's Pack200 module, packed with -E1
    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();
    }
View Full Code Here

    // Test with an archive containing Harmony's Pack200 module
    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();
    }
View Full Code Here

    // Test with an archive containing Harmony's JNDI module
    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();
    }
View Full Code Here

    // Test with an archive containing Annotations
    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();
    }
View Full Code Here

    public void testWithE0() throws Exception  {
        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();
    }
View Full Code Here

    public void testHelloWorld() throws IOException, Pack200Exception, URISyntaxException {
        in = new JarFile(new File(Archive.class.getResource(
                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
        file = File.createTempFile("helloworld", ".pack.gz");
        out = new FileOutputStream(file);
        new Archive(in, out, null).pack();
        in.close();
        out.close();

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

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

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

TOP

Related Classes of com.sun.tools.javac.util.JavacFileManager$Archive

Copyright © 2018 www.massapicom. 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.