title: Alternatives to deprecated Files.copy, ByteStreams.copy, InputSupplier
body: <p>I'm upgrading Guava library in my application. I have the following structure in several places, to create &amp; write to a <code>File</code> from an <code>InputStream</code>.</p>
  
  <pre><code>File destination;
  InputStream myInputStream; 
  .
  .
  .
  Files.copy(new InputSupplier&lt;InputStream&gt;() {
      @Override
      public InputStream getInput() throws IOException {
          return myInputStream;
      }
  }, destination);
  </code></pre>
  
  <p>The problem is, <code>InputSupplier</code> and <code>Files.copy</code> have been deprecated, and some other alternatives like <code>ByteStreams.copy</code> are deprecated as well</p>
  
  <p>Can anybody tell me if there's a natural substitute in Guava to write an arbitrary InputStream to a File?</p>