Here you can find the source of toObject(byte[] primitiveArray)
public static Byte[] toObject(byte[] primitiveArray)
//package com.java2s; //License from project: Open Source License public class Main { public static Byte[] toObject(byte[] primitiveArray) { Byte[] objectArray = new Byte[primitiveArray.length]; for (int i = 0; i < primitiveArray.length; i++) objectArray[i] = primitiveArray[i]; return objectArray; }/*w w w . ja v a 2 s . c o m*/ public static Integer[] toObject(int[] primitiveArray) { Integer[] objectArray = new Integer[primitiveArray.length]; for (int i = 0; i < primitiveArray.length; i++) objectArray[i] = primitiveArray[i]; return objectArray; } public static Double[] toObject(double[] primitiveArray) { Double[] objectArray = new Double[primitiveArray.length]; for (int i = 0; i < primitiveArray.length; i++) objectArray[i] = primitiveArray[i]; return objectArray; } public static Long[] toObject(long[] primitiveArray) { Long[] objectArray = new Long[primitiveArray.length]; for (int i = 0; i < primitiveArray.length; i++) objectArray[i] = primitiveArray[i]; return objectArray; } public static Float[] toObject(float[] primitiveArray) { Float[] objectArray = new Float[primitiveArray.length]; for (int i = 0; i < primitiveArray.length; i++) objectArray[i] = primitiveArray[i]; return objectArray; } }