Here you can find the source of toUnsignedByteArray(byte[] b)
public static int[] toUnsignedByteArray(byte[] b)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] toUnsignedByteArray(byte[] b) { int[] r = new int[b.length]; for (int i = 0; i < b.length; i++) { r[i] = b[i] + 0x80;//from ww w . j a v a 2s. c om } return r; } }