/** Construct progress source object. */ public ProgressSource(URL url, String method, int expected) { this.url = url; this.method = method; this.contentType = "content/unknown"; this.progress = 0; this.lastProgress = 0; this.expected = expected; this.state = State.NEW; this.progressMonitor = ProgressMonitor.getDefault(); this.threshold = progressMonitor.getProgressUpdateThreshold(); }