Changeset 6787 in josm for trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
- Timestamp:
- 2014-01-30T18:02:53+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
r6716 r6787 87 87 return getInputStreamRaw(urlStr, progressMonitor, null); 88 88 } 89 89 90 90 /** 91 91 * Open a connection to the given url and return a reader on the input stream … … 151 151 String errorHeader = activeConnection.getHeaderField("Error"); 152 152 StringBuilder errorBody = new StringBuilder(); 153 try 154 { 155 InputStream i = FixEncoding(activeConnection.getErrorStream(), encoding); 153 try { 154 InputStream i = fixEncoding(activeConnection.getErrorStream(), encoding); 156 155 if (i != null) { 157 156 BufferedReader in = new BufferedReader(new InputStreamReader(i)); … … 170 169 } 171 170 172 return FixEncoding(new ProgressInputStream(activeConnection, progressMonitor), encoding);171 return fixEncoding(new ProgressInputStream(activeConnection, progressMonitor), encoding); 173 172 } catch (OsmTransferException e) { 174 173 throw e; … … 181 180 } 182 181 183 private InputStream FixEncoding(InputStream stream, String encoding) throws IOException 184 { 182 private InputStream fixEncoding(InputStream stream, String encoding) throws IOException { 185 183 if ("gzip".equalsIgnoreCase(encoding)) { 186 184 stream = new GZIPInputStream(stream); 187 } 188 else if ("deflate".equalsIgnoreCase(encoding)) { 185 } else if ("deflate".equalsIgnoreCase(encoding)) { 189 186 stream = new InflaterInputStream(stream, new Inflater(true)); 190 187 }
Note:
See TracChangeset
for help on using the changeset viewer.