Changeset 9529 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-01-18T21:42:58+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r9396 r9529 103 103 connection.setFixedLengthStreamingMode(requestBody.length); 104 104 connection.setDoOutput(true); 105 final ProgressMonitor subTaskMonitor = progressMonitor.createSubTaskMonitor(1, false); 105 106 try (OutputStream out = new BufferedOutputStream( 106 new ProgressOutputStream(connection.getOutputStream(), requestBody.length, progressMonitor))) {107 new ProgressOutputStream(connection.getOutputStream(), requestBody.length, subTaskMonitor))) { 107 108 out.write(requestBody); 108 109 } … … 256 257 in = connection.getErrorStream(); 257 258 } 259 monitor.subTask(tr("Fetching content...")); 258 260 if (in != null) { 259 in = new ProgressInputStream(in, getContentLength(), monitor );261 in = new ProgressInputStream(in, getContentLength(), monitor.createSubTaskMonitor(1, false)); 260 262 in = "gzip".equalsIgnoreCase(getContentEncoding()) ? new GZIPInputStream(in) : in; 261 263 Compression compression = Compression.NONE;
Note:
See TracChangeset
for help on using the changeset viewer.