createLogEntity();
FileRunner.addCreateFile(Integer.toString(fileNumber + 1));
} else {
raFile = new RandomAccessFile(file, "rwd");
if (raFile.length() < LogEntity.messageStartPosition) {
throw new FileFormatException("file format error");
}
fc = raFile.getChannel();
mappedByteBuffer = fc.map(MapMode.READ_WRITE, 0,
this.fileLimitLength);
// magicString
byte[] b = new byte[8];
mappedByteBuffer.get(b);
magicString = new String(b);
if (magicString.equals(MAGIC) == false) {
throw new FileFormatException("file format error");
}
// version
version = mappedByteBuffer.getInt();
// nextfile
nextFile = mappedByteBuffer.getInt();