Here you can find the source of align(int size, int alignment)
private static int align(int size, int alignment)
//package com.java2s; //License from project: Apache License public class Main { private static int align(int size, int alignment) { return ((size / alignment) + 1) * alignment; }/*ww w .j a va 2 s . co m*/ }