private void readCursorFile() throws IOException {
        String fileName = getFileName(fileCursor);
        try (BufferedReader fileCursorReader = new BufferedReader(new FileReader(fileName))) {
            String line;
            String lastLine = null;
            //read the last number
            while ((line = fileCursorReader.readLine()) != null) {
                line = line.trim();
                if (!line.isEmpty()) {
                    lastLine = line;
                }
            }
            if (lastLine != null) {
                cursor.set(NumberUtils.toInt(lastLine));
            }
        }
    }
Store urls and cursor in files so that a Spider can resume the status when shutdown.<br>

@author code4crafter@gmail.com <br>
@since 0.2.0
webmagic-extension/src/main/java/us/codecraft/webmagic/scheduler/FileCacheQueueScheduler.java