Here you can find the source of zeroPad(final int length, final byte[] bytes)
private static byte[] zeroPad(final int length, final byte[] bytes)
//package com.java2s; //License from project: Open Source License public class Main { private static byte[] zeroPad(final int length, final byte[] bytes) { final byte[] padded = new byte[length]; System.arraycopy(bytes, 0, padded, 0, bytes.length); return padded; }/*from w ww .ja v a2 s . co m*/ }