Java Object Create toObject(byte[] array)

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

Description

to Object

License

Open Source License

Declaration

public static Byte[] toObject(byte[] array) 

Method Source Code

//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;
    }
}

Related

  1. as(Object o, Class clazz)
  2. as(Object obj)
  3. as(Object value, Class c)
  4. as(Object value, Class type)
  5. toObject(boolean[] array)
  6. toObject(byte[] byteArray)
  7. toObject(byte[] primitiveArray)
  8. toObject(Class clazz, String value)
  9. toObject(double[] a)