public void initialize(int pieceLength,BitMap bm) throws IOException{
		this.pieceLength = pieceLength;
		this.leftPiece = (int) (byteOffSet/pieceLength);
		this.rightPiece = (int) Math.ceil((double)(byteOffSet+length)/pieceLength)-1;//len 0?
		numPieces = rightPiece - leftPiece + 1;
		f = new File(topFolder+"\\"+pathAndName);
		if(f.isFile()){
			//file exists. 
			//Act as if its all there.
			//(we check more in depth later.)
			raf = new RandomAccessFile(f,"rw");
			int pStart = (int)byteOffSet/pieceLength;
			int pEnd =(int)Math.ceil((double)(byteOffSet + length)/pieceLength);
			for(int s=pStart;s<pEnd;s++){
				long fp = getIdeaFilePoint(s);
				pieceIndexToOffSet.put(s, fp);
				bm.addPieceComplete(s);
			}
			isPartial = false;
			return;
		}
		isPartial = true;
		//ok file isnt here. is the .partial there?
		f = new File(topFolder+"\\"+pathAndName+".partial");
		if(f.isFile()){
			raf = new RandomAccessFile(f,"rw");
			//read through
			raf.seek(0);
			while(raf.getFilePointer()<raf.length()){
				int pIndex = raf.readInt();
				bm.addPieceComplete(pIndex);
				pieceIndexToOffSet.put(pIndex,raf.getFilePointer());
				int i = getSizeFrom(pIndex);
				raf.skipBytes(i);
			}
			
			return;
		}
	
		//ok neither exist. lets make this now.
		if(f.getParent()!=null){
			File fp = new File(f.getParent());
			fp.mkdirs();
		}
		raf = new RandomAccessFile(f,"rw");
	}