Package org.apache.harmony.archive.internal.pack200

Examples of org.apache.harmony.archive.internal.pack200.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 cardinality;
    }

    public long decode(InputStream in) throws IOException, Pack200Exception {
        if (d != 0)
            throw new Pack200Exception(
                    "Delta encoding used without passing in last value; this is a coding error");
        return decode(in, 0);
    }
View Full Code Here

    public byte[] encode(long value, long last) throws Pack200Exception {
        if (isDelta()) {
            value -= last;
        }
        if (!encodes(value)) {
            throw new Pack200Exception("The codec " + toString()
                    + " does not encode the value " + value);
        }
        long z = value;
        if (isSigned()) {
            if (z < 0) {
View Full Code Here

    private final Codec bCodec;
    private long last;

    public RunCodec(int k, Codec aCodec, Codec bCodec) throws Pack200Exception {
        if (k <= 0)
            throw new Pack200Exception(
                    "Cannot have a RunCodec for a negative number of numbers");
        if (aCodec == null || bCodec == null)
            throw new Pack200Exception("Must supply both codecs for a RunCodec");
        this.k = k;
        this.aCodec = aCodec;
        this.bCodec = bCodec;
    }
View Full Code Here

        this.l = l;
        this.unvafouredCodec = unvafouredCodec;
    }

    public long decode(InputStream in) throws IOException, Pack200Exception {
        throw new Pack200Exception(
                "Population encoding does not work unless the number of elements are known");
    }
View Full Code Here

                "Population encoding does not work unless the number of elements are known");
    }

    public long decode(InputStream in, long last) throws IOException,
            Pack200Exception {
        throw new Pack200Exception(
                "Population encoding does not work unless the number of elements are known");
    }
View Full Code Here

                    BHSDCodec codec = new BHSDCodec(b, 256 - l, 0);
                    if (codec.encodes(k))
                        tokenCodec = codec;
                }
                if (tokenCodec == null)
                    throw new Pack200Exception(
                            "Cannot calculate token codec from " + k + " and "
                                    + l);
            }
        }
        // read favorites
View Full Code Here

TOP

Related Classes of org.apache.harmony.archive.internal.pack200.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.