Here you can find the source of roundup_2n(long val, int blocksize)
private static long roundup_2n(long val, int blocksize)
//package com.java2s; /* This code is part of Freenet. It is distributed under the GNU General * Public License, version 2 (or at your option any later version). See * http://www.gnu.org/ for further details of the GPL. */ public class Main { /** Round up a value to the next multiple of a power of 2 */ private static long roundup_2n(long val, int blocksize) { int mask = blocksize - 1; return (val + mask) & ~mask; }/*from w w w.ja v a 2 s . com*/ }