private void readAllRecords(HFileScanner scanner) throws IOException {
    readAndCheckbytes(scanner, 0, 100);
  }
Create a truncated hfile and verify that exception thrown.
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java