Here you can find the source of addLeadingZero(byte[] value)
public static byte[] addLeadingZero(byte[] value)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] addLeadingZero(byte[] value) { byte[] result = new byte[value.length + 1]; result[0] = 0;/*from ww w. ja v a 2 s . co m*/ System.arraycopy(value, 0, result, 1, value.length); return result; } }