I thought this was the question:
Is there a way to directly read/write from a file to an integer array and vice versa?
You can do that with Object*putStreams.
As for converting between primitive arrays, there's no way directly "cast" them. You need to create a new array of the type and size required and copy the values. System.arraycopy() can do the copy for you.