Java Byte Array Create toByteArray(final byte[][] array)

Here you can find the source of toByteArray(final byte[][] array)

Description

Converts a double byte array into a double Byte array.

License

Open Source License

Parameter

Parameter Description
array the double byte array to convert into double Byte array

Return

a double array of Byte objects containing values from the double byte array

Declaration

public static Byte[][] toByteArray(final byte[][] array) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from  ww  w .  j a v  a 2s . c om
     * Converts a double byte array into a double Byte array. 
     * 
     * @param array the double byte array to convert into double Byte array
     * @return a double array of Byte objects containing values from the double byte array
     */
    public static Byte[][] toByteArray(final byte[][] array) {
        if (array == null) {
            return null;
        }
        final Byte[][] byteArray = new Byte[array.length][];
        for (int i = 0; i < array.length; i++) {
            byteArray[i] = new Byte[array[i].length];
            for (int j = 0; j < array[i].length; j++) {
                byteArray[i][j] = array[i][j];
            }
        }
        return byteArray;
    }
}

Related

  1. toByteArray(char[] chars)
  2. toByteArray(char[] src)
  3. toByteArray(CharSequence hexString)
  4. toByteArray(double[][] array)
  5. toByteArray(final byte[] bytes)
  6. toByteArray(final char[] array)
  7. toByteArray(final char[] array)
  8. toByteArray(final int i)
  9. toByteArray(final int i)