I use an ArrayList with the wrapper class Short.
After adding some values I want to get the primitive array, but it seems that there is no way with the function toArray(Object[] array), because it need an Array with the wrapper class.
Is there another way without using a for or anything like that?
Apache Commons / Lang has a class ArrayUtils that defines these methods.
toObject()convert from primitive array to wrapper array.toPrimitive()convert from wrapper object array to primitive arrayI think, you need
ArrayUtils'stoPrimitive()