Here you can find the source of convertObjectArrayToByte(Object[] array)
Parameter | Description |
---|---|
array | The object array |
public static byte[] convertObjectArrayToByte(Object[] array)
//package com.java2s; //License from project: Open Source License public class Main { /**//from www .j ava 2 s. c o m * Converts an object array to the primitive type * @param array The object array * @return The primitive array */ public static byte[] convertObjectArrayToByte(Object[] array) { byte[] primitives = new byte[array.length]; for (int i = 0; i < array.length; i++) primitives[i] = (byte) (Byte) array[i]; return primitives; } }