title: Alternative to java.nio.file
body: <p>I'm using Android Studio 2.3.1 and jdk 1.8 for this project.</p>
  
  <p>I import a project and it's using 'java.nio.file.Files' and 'java.nio.file.Paths'.</p>
  
  <p>Package "java.nio.file" does not exist in Java 8.</p>
  
  <p>Also Android Studio does not allow to select jdk 1.7.</p>
  
  <p>What can i do with this code ?</p>
  
  <pre><code>public void toFile(final String path) throws IOException {
      Files.write(Paths.get(path), toBuffer());
  }
  </code></pre>
  
  <p>and this code</p>
  
  <pre><code>public static Source fromFile(final String path) throws IOException {
      return fromBuffer(Files.readAllBytes(Paths.get(path)));
  }
  </code></pre>
  
  <p>** (Cannot resolve Files and Paths)</p>
  
  <p>Thanks</p>