private boolean readOneFile(File logFile, RecordProcessor<T> processor, int logNameIndex) {
        FileInputStream in = null;
        try {
            if (!logFile.exists()) return false;
            RandomAccessFile randomAccessFile = new RandomAccessFile(logFile, "r");
            in = new FileInputStream(randomAccessFile.getFD());
            DataInputStream positionInputStream = new DataInputStream(in);
            int position = (int) (randomAccessFile.length() - 4);
            randomAccessFile.seek(position);
            int startPosition = positionInputStream.readInt();
            position = position - 4;
            randomAccessFile.seek(position);
            int endPosition = positionInputStream.readInt();
            boolean isContinue = true;
            while (isContinue) { //读取从syncPosition 到 syncEndPosition的Record
                DataInputStream recordInputStream = new DataInputStream(new BufferedInputStream(in));
                LinkedList<Record> records = new LinkedList<Record>();
                randomAccessFile.seek(startPosition);
                int start = startPosition;
                while (start < (endPosition - 1)) {
                    Record record = (Record) readMethod.invoke(0, recordInputStream);
                    start = recordInputStream.readInt();
                    record.setStartPosition(start);
                    record.setLogNameIndex(logNameIndex);
                    records.push(record);
                    recordInputStream.readInt();// sycn postion
                }
                for (Record record : records) {
                    isContinue = processor.on((T) record);
                    if (!isContinue) break;
                }

                if (startPosition == 0) {
                    break;
                }

                position = startPosition - 4;
                randomAccessFile.seek(position);
                startPosition = positionInputStream.readInt();
                position = position - 4;
                randomAccessFile.seek(position);
                endPosition = positionInputStream.readInt();
            }
            return isContinue;
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }