I have a big file, it\'s expected to be around 12 GB. I want to load it all into memory on a beefy 64-bit machine with 16 GB RAM, but I think Java does not support byte arra
Java arrays use integers for their indices. As a result, the maximum array size is Integer.MAX_VALUE.
(Unfortunately, I can't find any proof from Sun themselves about this, but there are plenty of discussions on their forums about it already.)
I think the best solution you could do in the meantime would be to make a 2D array, i.e.:
byte[][] data;