I have an array of 1.5 billion long entry. Now, I want to write in into disk and read it back again. Can anybody help me is there any java library (or custom procedure) to do it efficiently.
Usually, I do it using FileChannel and MappedByteBuffer. But, for 1.5 billion long entry it simply exceeds the limit.
Edit:
FileChannel ch = new RandomAccessFile(path, "r").getChannel();
MappedByteBuffer mb = ch.map(FileChannel.MapMode.READ_ONLY, 0, ch.size());
mb.order(ByteOrder.nativeOrder());