Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Having to work with large files now, I would like to know when the java libraries will start switching to long for indexing in their methods.

From Inputstreams read(byte[] b, int off, int len) - funnily there is long skip(long) also - to MappedByteBuffer to the basic indexing of arrays and lists, everything is adressed as int.

Is there an official plan for enhancment of the libraries?

Do initiatives exist to pressure oracle into enhancing the libraries, if there is no official plan yet?

share|improve this question

closed as unclear what you're asking by MichaelT, GlenH7, gnat, Bart van Ingen Schenau, World Engineer Apr 12 at 17:57

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

2 Answers

up vote 11 down vote accepted

p42 of slides at Simon Ritter's PDF To Java SE 8, and Beyond! - QCon London indicates that it is scheduled for Java 9.

Incidentally, the keyword you were lacking to find this yourself with Google in 10 seconds is JSR.

share|improve this answer
    
I had to vent some frustration, and the visions of Java9 will be to late for me. –  Ido Tamir Jun 7 '12 at 10:10
add comment

files can already be addressed by longs and having a byte buffer of over 2 GigaByte is a waste and will lead to a OutOfMemoryException very fast on 32 bit machines (use multiple byte buffers if you need to have that big of a range)

also the FileChannel.map takes longs to specifiy the offset and size allowing you to map passed the 2GB mark

also RandomAccessFile uses a long for the seek index

share|improve this answer
    
Why would it be wasteful to have a byte buffer over 2Gb? I have the same need myself. I have 16Gb on my development laptop and 128Gb on my largest server. The "multiple ByteBuffer" workaround is inefficient. –  Tim Cooper Apr 12 at 0:57
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.