Skip to content

Commit

Permalink
Updates to the download() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Yocum committed Dec 12, 2012
1 parent f5d294f commit e637b99
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,6 @@ public void download(final com.illumina.basespace.File file, long fileStart, lon
readTheFile:
while((bytesRead = in.read(outputByte, 0, CHUNK_SIZE)) != -1)
{
// Old way was to make a new one each time.
// ByteBuffer bb = ByteBuffer.wrap(outputByte,0,bytesRead);
// logger.info("------FC at ("+fc.position()+") setting WRITE at ("+targetStart+progress+")");
bb.clear();
bb.put(outputByte,0,bytesRead);
fc.write(bb);
Expand Down Expand Up @@ -454,9 +451,7 @@ public void download(final com.illumina.basespace.File file, long fileStart, lon
}
else
{
// Could be called even if we get an exception, must pass progress, not length: KGY
// In addition, we won't know that it is canceled if it is first chunk!!!
// At the moment, I handle this above this call.
// Could be called even if we get an exception, must pass progress, not length
DownloadEvent evt = new DownloadEvent(this,file.getHref(),progress,len);
fireCompleteEvent(evt);
}
Expand Down

0 comments on commit e637b99

Please sign in to comment.