As the title says, I\'m looking for the fastest possible way to write integer arrays to files. The arrays will vary in size, and will realistically contain anywhere between
Array is Serializable - can't you just use writer.writeObject(data);? That's definitely going to be faster than individual writeInt calls.
writer.writeObject(data);
writeInt
If you have other requirements on the output data format than retrieval into int[], that's a different question.
int[]