public boolean isValidIndex(long index) {
    	try {
    		return index >= 0 && index < randomAccessFile.length();
    	}
    	catch (IOException e) {
    	}
    	return false;
    }
@see GByteProvider.app.util.bin.ByteProvider#length()
GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GByteProvider.java