protected long checkRegions ( long offset , int length ) throws IOException { if ( offset + length > filledUpTo ) throw new IOException ( "Can't access memory outside the file size (" + filledUpTo + " bytes). You've requested portion " + offset + "-" + ( offset + length ) + " bytes. File: " + osFile . getAbsolutePath ( ) + "\n" + "actual Filesize: " + size + "\n" + "actual filledUpTo: " + filledUpTo ) ; return offset ; }
checks if the accessed region is accessible