@Test public void unboxedByteArrayToBoxed() { final Byte[] expected = new Byte[]{0x55, 0x66, 0x14}; assertThat(toByteArray(new byte[]{0x55, 0x66, 0x14})).isEqualTo(expected); }
@Nullable @CheckResult public static byte[] toByteArray(@Nullable Byte[] array) { if (array == null) { return null; } else if (array.length == 0) { return EMPTY_PRIMITIVE_BYTES; } else { byte[] result = new byte[array.length]; for (int i = 0, size = array.length; i < size; ++i) { result[i] = array[i]; } return result; } }
Utils { @Nullable @CheckResult public static byte[] toByteArray(@Nullable Byte[] array) { if (array == null) { return null; } else if (array.length == 0) { return EMPTY_PRIMITIVE_BYTES; } else { byte[] result = new byte[array.length]; for (int i = 0, size = array.length; i < size; ++i) { result[i] = array[i]; } return result; } } }
Utils { @Nullable @CheckResult public static byte[] toByteArray(@Nullable Byte[] array) { if (array == null) { return null; } else if (array.length == 0) { return EMPTY_PRIMITIVE_BYTES; } else { byte[] result = new byte[array.length]; for (int i = 0, size = array.length; i < size; ++i) { result[i] = array[i]; } return result; } } private  Utils(); }
Utils { @Nullable @CheckResult public static byte[] toByteArray(@Nullable Byte[] array) { if (array == null) { return null; } else if (array.length == 0) { return EMPTY_PRIMITIVE_BYTES; } else { byte[] result = new byte[array.length]; for (int i = 0, size = array.length; i < size; ++i) { result[i] = array[i]; } return result; } } private  Utils(); @NonNull @CheckResult static String randomTableName(); @NonNull @CheckResult static String addTableAlias(@NonNull Table<?> table, @NonNull SimpleArrayMap<String, LinkedList<String>> systemRenamedTables); @Nullable @CheckResult static byte[] toByteArray(@Nullable Byte[] array); @Nullable @CheckResult static Byte[] toByteArray(@Nullable byte[] array); }
Utils { @Nullable @CheckResult public static byte[] toByteArray(@Nullable Byte[] array) { if (array == null) { return null; } else if (array.length == 0) { return EMPTY_PRIMITIVE_BYTES; } else { byte[] result = new byte[array.length]; for (int i = 0, size = array.length; i < size; ++i) { result[i] = array[i]; } return result; } } private  Utils(); @NonNull @CheckResult static String randomTableName(); @NonNull @CheckResult static String addTableAlias(@NonNull Table<?> table, @NonNull SimpleArrayMap<String, LinkedList<String>> systemRenamedTables); @Nullable @CheckResult static byte[] toByteArray(@Nullable Byte[] array); @Nullable @CheckResult static Byte[] toByteArray(@Nullable byte[] array);  }