Exemplo n.º 1
0
 /**
  * Get the chunk for the given position.
  *
  * @param pos the position
  * @return the chunk
  */
 private BTreeChunk getChunk(long pos) {
   int chunkId = DataUtils.getPageChunkId(pos);
   BTreeChunk c = chunks.get(chunkId);
   if (c == null) c = readChunkHeader(chunkId);
   if (c == null)
     throw DataUtils.newIllegalStateException(
         DataUtils.ERROR_FILE_CORRUPT, "Chunk {0} not found", chunkId);
   return c;
 }