Package sun.security.util

Examples of sun.security.util.BitArray.truncate()


        check(v2.getUnalignedBitString().length(), 3);

        BitArray ba;
        ba = new BitArray(new boolean[] {false, false, false});
        check(ba.length(), 3);
        ba = ba.truncate();
        check(ba.length(), 1);

        ba = new BitArray(new boolean[] {
            true, true, true, true, true, true, true, true,
            false, false});
View Full Code Here


        ba = new BitArray(new boolean[] {
            true, true, true, true, true, true, true, true,
            false, false});
        check(ba.length(), 10);
        check(ba.toByteArray().length, 2);
        ba = ba.truncate();
        check(ba.length(), 8);
        check(ba.toByteArray().length, 1);

        ba = new BitArray(new boolean[] {
            true, true, true, true, true, true, true, true,
View Full Code Here

        ba = new BitArray(new boolean[] {
            true, true, true, true, true, true, true, true,
            true, false});
        check(ba.length(), 10);
        check(ba.toByteArray().length, 2);
        ba = ba.truncate();
        check(ba.length(), 9);
        check(ba.toByteArray().length, 2);
    }

    static void check(int la, int lb) throws Exception {
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.