Here you can find the source of convertArray(byte[] a)
public static Byte[] convertArray(byte[] a)
//package com.java2s; public class Main { public static Byte[] convertArray(byte[] a) { Byte[] ret = new Byte[a.length]; for (int i = 0; i < a.length; i++) { ret[i] = a[i];//from w w w . ja va 2 s. c om } return ret; } public static Short[] convertArray(short[] a) { Short[] ret = new Short[a.length]; for (int i = 0; i < a.length; i++) { ret[i] = a[i]; } return ret; } public static Integer[] convertArray(int[] a) { Integer[] ret = new Integer[a.length]; for (int i = 0; i < a.length; i++) { ret[i] = a[i]; } return ret; } public static Long[] convertArray(long[] a) { Long[] ret = new Long[a.length]; for (int i = 0; i < a.length; i++) { ret[i] = a[i]; } return ret; } public static Float[] convertArray(float[] a) { Float[] ret = new Float[a.length]; for (int i = 0; i < a.length; i++) { ret[i] = a[i]; } return ret; } public static Double[] convertArray(double[] a) { Double[] ret = new Double[a.length]; for (int i = 0; i < a.length; i++) { ret[i] = a[i]; } return ret; } }