Integer key = new Integer((int) nr);  if (cache.containsKey(key)) result = (Block) cache.get(key); else { byte[] data = new byte[blockSize]; api.read(nr * blockSize, data, 0, blockSize); result = new Block(data); cache.put(key, result);
Integer key=new Integer((int)(nr)); synchronized(blockCache) {  if(blockCache.containsKey(key)) result=(Block)blockCache.get(key); else{ byte[] data = new byte[blockSize];  timedRead(nr, data); result=new Block(this, nr, data); blockCache.put(key, result); }
	public byte[] getBlock(long nr) throws IOException {		int blockSize = superblock.getBlockSize();		Block result;		Integer key = new Integer((int) nr);		//check if the block has already been retrieved		if (cache.containsKey(key))			result = (Block) cache.get(key);		else {			byte[] data = new byte[blockSize];			api.read(nr * blockSize, data, 0, blockSize);			result = new Block(data);			cache.put(key, result);		}		return result.getData();	}