I am reading a file by using:
int len = (int)(new File(args[0]).length());
FileInputStream fis =
new FileInputStream(args[0]);
byte buf[] = n
You've said in the comments that you want four bytes from the input array to correspond to one integer on the output array, so that works out nicely.
Depends on whether you expect the bytes to be in big-endian or little-endian order, but...
IntBuffer intBuf =
ByteBuffer.wrap(byteArray)
.order(ByteOrder.BIG_ENDIAN)
.asIntBuffer();
int[] array = new int[intBuf.remaining()];
intBuf.get(array);
Done, in three lines.