Here you can find the source of roundUp(long size, int blockSize)
public static long roundUp(long size, int blockSize)
//package com.java2s; //License from project: Open Source License public class Main { public static long roundUp(long size, int blockSize) { return ((size + blockSize - 1) / blockSize) * blockSize; }//from www. ja v a 2s . c o m }