private void commit() { ProgressEvent e = new ProgressEvent(ProgressEvent.TRANSFERRED); e.setBytesTransferred(this.unnotifiedByteCount); listener.progressChanged(e); this.unnotifiedByteCount = 0; }