I have a big file of size 10gb, If i read its whole contents using readfully() in java, I get a outofmemoryerror, so i decided to read the big 10gb file in parts using same readfully(), for this i need to pass the offset and length parameters for readfully(). The offset must be of long or double datatype so that it can point to different parts of the file. But the readfully() accepts only int offset. How to read the big data?
try {
IOUtils.readFully(in, contents, minOffset, maxOffset);
value.set(contents, 0, contents.length);
} finally {
IOUtils.closeStream(in);
}
Can I use seek() to get to a specific position and then use readfully() from that position?
readFullyinstead of proper streaming given that you do not want to read the whole file at once?