while ((readBytes = in.read(buffer)) > 0) {
received += readBytes;
fileOutputStream.write(buffer, 0, readBytes);
monitor.worked(readBytes);
monitor.subTask(watch.throughput(received));
if (monitor.isCanceled() && !canceled) {
// just stop once
getStreamSession().stopSession();
canceled = true;