synchronized(blockCache) {  if(blockCache.containsKey(key)) result=(Block)blockCache.get(key); else{ byte[] data = new byte[blockSize]; getApi().read( nr*blockSize, data, 0, blockSize );  result=new Block(this, nr, data); blockCache.put(key, result); } }  return result.getData();
synchronized(blockCache) {  if(blockCache.containsKey(key)) { result=(Block)blockCache.get(key); return result.getData(); } }           byte[] data = new byte[blockSize]; getApi().read( nr*blockSize, data, 0, blockSize );   synchronized(blockCache) {  if(!blockCache.containsKey(key)) { result=new Block(this, nr, data); blockCache.put(key, result); return result.getData(); } else {   result=(Block)blockCache.get(key); return result.getData(); } }
	public byte[] getBlock(long nr) throws IOException{		if(isClosed())			throw new IOException("FS closed (fs instance: "+this+")");		//log.debug("blockCache size: "+blockCache.size());				int blockSize = superblock.getBlockSize();		Block result;				Integer key=new Integer((int)(nr));		synchronized(blockCache) {			//check if the block has already been retrieved			if(blockCache.containsKey(key)) 				result=(Block)blockCache.get(key);			else{				byte[] data = new byte[blockSize];				getApi().read( nr*blockSize, data, 0, blockSize );				//timedRead(nr, data);				result=new Block(this, nr, data);				blockCache.put(key, result);			}		}					return result.getData();	}