Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 11855)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 11856)
@@ -15,5 +15,4 @@
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseEvent;
-import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.File;
@@ -507,9 +506,6 @@
                         tr("Save style ''{0}'' as ''{1}''", s.getDisplayString(), file.getPath()));
                 try {
-                    InputStream in = s.getSourceInputStream();
-                    try (InputStream bis = new BufferedInputStream(in)) {
-                        Files.copy(bis, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
-                    } finally {
-                        s.closeSourceInputStream(in);
+                    try (InputStream in = s.getSourceInputStream()) {
+                        Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
                     }
                 } catch (IOException e) {
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 11855)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 11856)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
@@ -483,6 +482,6 @@
                 throw new IOException(tr("The requested URL {0} was not found", urlStr));
             }
-            try (InputStream bis = new BufferedInputStream(con.getContent())) {
-                Files.copy(bis, destDirFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+            try (InputStream is = con.getContent()) {
+                Files.copy(is, destDirFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
             }
             activeConnection = null;
