JSONObject json = new JSONObject();
if (mon_obj != null) {
ProgressMonitor monitor = (ProgressMonitor) mon_obj;
json.accumulate("bytesSent", "" + monitor.getBytesRead());
json.accumulate("bytesTotal", "" + monitor.getBytesLength());
json.accumulate("percentComplete", "" + monitor.percentComplete());
if(!monitor.isStillProcessing() || monitor.isAborted()) {
json.accumulate("aborted", true);
}else {
json.accumulate("aborted", false);