private synchronized void checkCompleted(){
		for(int i = 0; i < this.blockOffsets.length; i++){
			if(!blocks.containsKey(this.blockOffsets[i])){
				return;
			}
		}
		if(this.isValid()){
			this.completed = true;
			this.data = new byte[this.length];
			for(int key : this.blocks.keySet()){
				Block b = this.blocks.get(key);
				int offset = b.getOffset();
				byte[] bdata = b.getData();
				for(int j = 0; j < bdata.length && offset + j < this.length; j++ ){
					this.data[offset + j] = bdata[j];
				}
			}
			
		}else
			this.blocks = new HashMap<Integer, Block>();
	}