Index: trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 13203)
+++ trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 13204)
@@ -5,8 +5,8 @@
 import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
 import java.util.concurrent.TimeUnit;
 
@@ -185,10 +185,10 @@
      */
     private void loadFromDisk() throws T {
-        try (BufferedInputStream input = new BufferedInputStream(new FileInputStream(path))) {
+        try (BufferedInputStream input = new BufferedInputStream(Files.newInputStream(path.toPath()))) {
             this.data = new byte[input.available()];
             if (input.read(this.data) < this.data.length) {
                 Logging.error("Failed to read expected contents from "+path);
             }
-        } catch (IOException e) {
+        } catch (IOException | InvalidPathException e) {
             Logging.trace(e);
             if (!isOffline()) {
@@ -202,8 +202,8 @@
      */
     private void saveToDisk() {
-        try (BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(path))) {
+        try (BufferedOutputStream output = new BufferedOutputStream(Files.newOutputStream(path.toPath()))) {
             output.write(this.data);
             output.flush();
-        } catch (IOException e) {
+        } catch (IOException | InvalidPathException e) {
             Logging.error(e);
         }
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 13203)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 13204)
@@ -8,5 +8,4 @@
 import java.io.Closeable;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -218,5 +217,5 @@
             }
         }
-        return new FileInputStream(file);
+        return Files.newInputStream(file.toPath());
     }
 
Index: trunk/src/org/openstreetmap/josm/io/Compression.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 13203)
+++ trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 13204)
@@ -3,10 +3,9 @@
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
@@ -150,5 +149,5 @@
      */
     public static InputStream getUncompressedFileInputStream(File file) throws IOException {
-        FileInputStream in = new FileInputStream(file);
+        InputStream in = Files.newInputStream(file.toPath());
         try {
             return byExtension(file.getName()).getUncompressedInputStream(in);
@@ -188,5 +187,5 @@
      */
     public static OutputStream getCompressedFileOutputStream(File file) throws IOException {
-        FileOutputStream out = new FileOutputStream(file);
+        OutputStream out = Files.newOutputStream(file.toPath());
         try {
             return byExtension(file.getName()).getCompressedOutputStream(out);
Index: trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 13203)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 13204)
@@ -7,5 +7,4 @@
 import java.io.BufferedInputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -15,4 +14,5 @@
 import java.net.URISyntaxException;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -715,9 +715,5 @@
             }
         } else {
-            try {
-                return new FileInputStream(sessionFile);
-            } catch (FileNotFoundException ex) {
-                throw new IOException(ex);
-            }
+            return Files.newInputStream(sessionFile.toPath());
         }
     }
Index: trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 13203)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 13204)
@@ -4,10 +4,9 @@
 import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -331,8 +330,6 @@
      */
     public void write(File f) throws IOException {
-        try (OutputStream out = new FileOutputStream(f)) {
+        try (OutputStream out = Files.newOutputStream(f.toPath())) {
             write(out);
-        } catch (FileNotFoundException e) {
-            throw new IOException(e);
         }
     }
