Examples of toByteArray_clear()


Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(22222);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 1000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void testRand10000() throws IOException {
        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(44444);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 10000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void testRandGaussian10000() throws IOException {
        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(3333);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 10000; i++) {
                data.writeDouble(rand.nextGaussian());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void probe(byte[] input) {
        LZSSCodec codec = new LZSSCodec();
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(22222);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 1000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void testRand10000() throws IOException {
        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(44444);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 10000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void testRandGaussian10000() throws IOException {
        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(3333);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 10000; i++) {
                data.writeDouble(rand.nextGaussian());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void probe(byte[] input) {
        LZFCodec codec = new LZFCodec();
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(22222);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 1000; i++) {
                data.writeInt(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void testRandChars2000() throws IOException {
        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(22222);
        for(int times = 0; times < 10; times++) {
            for(int i = 0; i < 2048; i++) {
                data.writeChar(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void testRandChars8K() throws IOException {
        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

        Random rand = new Random(22222);
        for(int times = 0; times < 10; times++) {
            for(int i = 0; i < 4096; i++) {
                data.writeChar(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }

    public void probe(byte[] input) {
        char[] inputc = Primitives.toChars(input);
View Full Code Here

Examples of xbird.util.io.FastMultiByteArrayOutputStream.toByteArray_clear()

    }

    public static byte[] toBytes(final Object obj) {
        final FastMultiByteArrayOutputStream bos = new FastMultiByteArrayOutputStream();
        toStream(obj, bos);
        return bos.toByteArray_clear();
    }

    public static byte[] toBytes(final Object obj, final int estimatedLen) {
        final FastMultiByteArrayOutputStream bos = new FastMultiByteArrayOutputStream(estimatedLen * 2);
        toStream(obj, bos);
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.