Index: trunk/src/org/openstreetmap/josm/io/Compression.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 9169)
+++ trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 9170)
@@ -108,5 +108,7 @@
      *
      * @throws IOException if any I/O error occurs
+     * @deprecated Use {@link org.openstreetmap.josm.tools.HttpClient} instead
      */
+    @Deprecated
     public static InputStream getUncompressedURLInputStream(URL url) throws IOException {
         return Utils.openURLAndDecompress(url, true);
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 9169)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 9170)
@@ -765,5 +765,7 @@
      * @throws java.io.IOException if an I/O exception occurs.
      * @since 5587
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static HttpURLConnection openHttpConnection(URL httpURL) throws IOException {
         if (httpURL == null || !HTTP_PREFFIX_PATTERN.matcher(httpURL.getProtocol()).matches()) {
@@ -785,7 +787,9 @@
      * @throws java.io.IOException if an I/O exception occurs.
      * @since 5867
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static InputStream openURL(URL url) throws IOException {
-        return openURLAndDecompress(url, false);
+        return HttpClient.create(url).connect().getContent();
     }
 
@@ -798,19 +802,9 @@
      * @throws IOException if an I/O exception occurs.
      * @since 6421
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static InputStream openURLAndDecompress(final URL url, final boolean decompress) throws IOException {
-        final URLConnection connection = setupURLConnection(url.openConnection());
-        final InputStream in = connection.getInputStream();
-        if (decompress) {
-            switch (connection.getHeaderField("Content-Type")) {
-            case "application/zip":
-                return getZipInputStream(in);
-            case "application/x-gzip":
-                return getGZipInputStream(in);
-            case "application/x-bzip2":
-                return getBZip2InputStream(in);
-            }
-        }
-        return in;
+        return HttpClient.create(url).connect().uncompress(decompress).getContent();
     }
 
@@ -868,5 +862,7 @@
      * @return {@code connection}, with updated properties
      * @since 5887
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static URLConnection setupURLConnection(URLConnection connection) {
         if (connection != null) {
@@ -884,7 +880,9 @@
      * @throws java.io.IOException if an I/O exception occurs.
      * @since 5868
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static BufferedReader openURLReader(URL url) throws IOException {
-        return openURLReaderAndDecompress(url, false);
+        return HttpClient.create(url).connect().getContentReader();
     }
 
@@ -897,7 +895,9 @@
      * @throws IOException if an I/O exception occurs.
      * @since 6421
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static BufferedReader openURLReaderAndDecompress(final URL url, final boolean decompress) throws IOException {
-        return new BufferedReader(new InputStreamReader(openURLAndDecompress(url, decompress), StandardCharsets.UTF_8));
+        return HttpClient.create(url).connect().uncompress(decompress).getContentReader();
     }
 
@@ -909,5 +909,7 @@
      * @throws java.io.IOException if an I/O exception occurs.
      * @since 5587
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static HttpURLConnection openHttpConnection(URL httpURL, boolean keepAlive) throws IOException {
         HttpURLConnection connection = openHttpConnection(httpURL);
@@ -935,5 +937,7 @@
      * @throws IOException if an I/O exception occurs
      * @since 8650
-     */
+     * @deprecated Use {@link HttpClient} instead
+     */
+    @Deprecated
     public static HttpURLConnection openHttpConnection(URL httpURL, boolean keepAlive, boolean followRedirects) throws IOException {
         HttpURLConnection connection = openHttpConnection(httpURL, keepAlive);
