Here you can find the source of toObject(byte[] array)
public static Byte[] toObject(byte[] array)
//package com.java2s; // Licensed under the MIT license. See LICENSE file in the project root for full license information. public class Main { public static final Byte[] EmptyByteObjectArray = new Byte[0]; public static Byte[] toObject(byte[] array) { if (array == null) { return null; } else if (array.length == 0) { return EmptyByteObjectArray; }/*from www . j a v a 2 s . com*/ final Byte[] result = new Byte[array.length]; for (int i = 0; i < array.length; i++) { result[i] = Byte.valueOf(array[i]); } return result; } }