Changeset 10160 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-04-27T12:47:30+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/StreamProgressUpdater.java
r9669 r10160 27 27 28 28 private void initProgressMonitor() { 29 progressMonitor.beginTask(taskTitle);30 29 if (size > 0) { 30 progressMonitor.beginTask(taskTitle); 31 31 progressMonitor.setTicksCount((int) size); 32 32 } else { -
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r9977 r10160 110 110 connection.setFixedLengthStreamingMode(requestBody.length); 111 111 connection.setDoOutput(true); 112 final ProgressMonitor subTaskMonitor = progressMonitor.createSubTaskMonitor(1, false);113 112 try (OutputStream out = new BufferedOutputStream( 114 new ProgressOutputStream(connection.getOutputStream(), requestBody.length, subTaskMonitor))) {113 new ProgressOutputStream(connection.getOutputStream(), requestBody.length, progressMonitor))) { 115 114 out.write(requestBody); 116 115 } … … 264 263 in = connection.getErrorStream(); 265 264 } 266 monitor.subTask(tr("Fetching content..."));267 265 if (in != null) { 268 in = new ProgressInputStream(in, getContentLength(), monitor .createSubTaskMonitor(1, false));266 in = new ProgressInputStream(in, getContentLength(), monitor); 269 267 in = "gzip".equalsIgnoreCase(getContentEncoding()) ? new GZIPInputStream(in) : in; 270 268 Compression compression = Compression.NONE;
Note:
See TracChangeset
for help on using the changeset viewer.