convertir l'arraylist d'entiers en array primitif

list.stream().mapToInt(i -> i).toArray();
Kirk-Patrick Brown