Ejemplo n.º 1
0
 @Override
 public void close() throws IOException {
   if (isMmap) {
     MmapUtils.unloadByteBuffer(chunkOffsetsBuffer);
     MmapUtils.unloadByteBuffer(bitsetBuffer);
     MmapUtils.unloadByteBuffer(rawDataBuffer);
     raf.close();
   } else {
     chunkOffsetsBuffer.clear();
     bitsetBuffer.clear();
     rawDataBuffer.clear();
   }
 }
 public void close() throws IOException {
   if (ownsByteBuffer) {
     if (isMmap) {
       MmapUtils.unloadByteBuffer(byteBuffer);
       file.close();
     } else {
       byteBuffer.clear();
     }
   }
 }