// 读取key内容
byte[] keyBytes = new byte[keyLength];
raf.read(keyBytes, 0, keyLength);
String keystr = ByteUtils.bytesToString(keyBytes);
if (!key.equals(keystr)) {
throw new ChecksumException("unmatch garble key with[" + key + "],[" + keystr + "]");
}
// 读取校验码长度
raf.seek(pos + keyLength);
byte[] crcBytes = new byte[crcLength];
raf.read(crcBytes, 0, crcLength);
String crcStr = ByteUtils.bytesToString(crcBytes);
if (!crc.equals(crcStr)) {
throw new ChecksumException("unmatch crc with[" + crc + "],[" + crcStr + "]");
}
// 设置文件长度
raf.setLength(pos);
} catch (Exception e) {