Package freenet.support.api

Examples of freenet.support.api.RandomAccessBucket.toRandomAccessBuffer()


            readBytes = is.read(buf);
            assertTrue(readBytes > 0);
            assertTrue(Arrays.equals(Arrays.copyOfRange(buf, 0, readBytes), Arrays.copyOfRange(data, moved, moved+readBytes)));
            moved += readBytes;
        }
        LockableRandomAccessBuffer raf = bucket.toRandomAccessBuffer();
        assertEquals(length, raf.size());
        RAFBucket wrapped = new RAFBucket(raf);
        assertTrue(BucketTools.equalBuckets(bucket, wrapped));
        for(int i=0;i<100;i++) {
            int end = length == 1 ? 1 : r.nextInt(length)+1;
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.