Possible Duplicate:
How to convert an ArrayList containing Integers to primitive int array?
How to convert an ArrayList<Byte>
into a byte[]
?
ArrayList.toArray()
gives me back a Byte[]
.
After calling toArray() you can pass the result into the Apache Commons toPrimitive method: