in src/main/java/com/spotify/sparkey/ReadOnlyMemMap.java [208:221]
public void readFully(byte[] buffer, int offset, int length) throws IOException {
MappedByteBuffer curChunk = getCurChunk();
long remaining = curChunk.remaining();
if (remaining >= length) {
curChunk.get(buffer, offset, length);
} else {
int remaining1 = (int) remaining;
curChunk.get(buffer, offset, remaining1);
length -= remaining1;
offset += remaining1;
next();
readFully(buffer, offset, length);
}
}