Java creating byte array whose size is represented by a long
(It is probably a bit late for the OP, but it might still be useful for others) Unfortunately Java does not support arrays with more than 231−1 elements. The maximum consumption is 2 GiB of space for a byte[] array, or 16 GiB of space for a long[] array. While it is probably not applicable … Read more