|
|
|
|
|
by poincaredisk
529 days ago
|
|
I'm not a Java programmer, but how would you load of a 1GB file into memory? I assume read returns some kind of an array. Also big arrays being (supposedly) a coffeee smell doesn't mean that code handling them improperly is not buggy. |
|
Those APIs use long as their offset unlike the 32 ints used by arrays, and would avoid having to copy the data into some other object.
There has been some discussion over the years about how arrays could be changed in the JVM to support longer lengths, but doing so without breaking existing code and while providing truly useful functionality without providing obvious footguns isn’t as easy as you might think.