Java array sizes

While attempting to copy a file’s contents to an array of bytes in Java I noticed something interesting that is taken for granted: array indexes are integers. This implies that only ~2G entries are available. Even though Java may have large file support (>2GB) and extended memory access enabled one cannot perform certain functions.

Nothing earth shattering here but it was one of those Hmmmm moments.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s