Package org.apache.harmony.unpack200

Examples of org.apache.harmony.unpack200.Pack200Exception


            int indexOfStartPC = unrenumbered_start_pcs[index];
            // Given the index of the start_pc, we can now add
            // the encodedLength to it to get the stop index.
            int stopIndex = indexOfStartPC + encodedLength;
            if (stopIndex < 0) {
                throw new Pack200Exception("Error renumbering bytecode indexes");
            }
            // Length can either be an index into the byte code offsets, or one
            // beyond the
            // end of the byte code offsets. Need to determine which this is.
            if (stopIndex == byteCodeOffsets.size()) {
View Full Code Here


            int indexOfStartPC = unrenumbered_start_pcs[index];
            // Given the index of the start_pc, we can now add
            // the encodedLength to it to get the stop index.
            int stopIndex = indexOfStartPC + encodedLength;
            if (stopIndex < 0) {
                throw new Pack200Exception("Error renumbering bytecode indexes");
            }
            // Length can either be an index into the byte code offsets, or one
            // beyond the
            // end of the byte code offsets. Need to determine which this is.
            if (stopIndex == byteCodeOffsets.size()) {
View Full Code Here

                return pool.getValue(SegmentConstantPool.CP_LONG, value);
            case 'D': // Double
                return pool.getValue(SegmentConstantPool.CP_DOUBLE, value);
            }
        }
        throw new Pack200Exception("Unknown layout encoding: " + layout);
    }
View Full Code Here

        } else {
            this.mask = 0;
        }
        if (context != CONTEXT_CLASS && context != CONTEXT_CODE
                && context != CONTEXT_FIELD && context != CONTEXT_METHOD)
            throw new Pack200Exception("Attribute context out of range: "
                    + context);
        if (layout == null) // || layout.length() == 0)
            throw new Pack200Exception("Cannot have a null layout");
        if (name == null || name.length() == 0)
            throw new Pack200Exception("Cannot have an unnamed layout");
        this.name = name;
        this.layout = layout;
        this.isDefault = isDefault;
    }
View Full Code Here

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

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

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

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

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

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

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

TOP

Related Classes of org.apache.harmony.unpack200.Pack200Exception

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.