Пример #1
0
 private void readInHeader(File filePath) throws IOException {
   int magic = myFile.getInt(HEADER_MAGIC_OFFSET);
   if (magic != SAFELY_CLOSED_MAGIC) {
     myFile.dispose();
     throw new IOException(
         "Records table for '" + filePath + "' haven't been closed correctly. Rebuild required.");
   }
   myWasteSize = myFile.getInt(HEADER_WASTE_SIZE_OFFSET);
 }
Пример #2
0
 public void dispose() {
   if (!myFile.isDisposed()) {
     markClean();
     myFile.dispose();
   }
 }