(boolean[] array, int newLength)
| 615 | } |
| 616 | |
| 617 | public static boolean[] copyOf(boolean[] array, int newLength) { |
| 618 | boolean[] result = new boolean[newLength]; |
| 619 | int length = array.length > newLength ? newLength : array.length; |
| 620 | System.arraycopy(array, 0, result, 0, length); |
| 621 | return result; |
| 622 | } |
| 623 | |
| 624 | public static byte[] copyOf(byte[] array, int newLength) { |
| 625 | byte[] result = new byte[newLength]; |