title: Copy large files in fastest way possible in Android
body: <p>I need to copy files from one destination to another in Android. For that I'm using FileStreams method to copy files. It works fine. But when it's copying large file (more than 400M) , it takes a lot of time. I have found several other methods, but those were not working with Android. </p>
  
  <p>Are there any specific methods in Android to do this better?</p>
  
  <pre><code>      InputStream in = new FileInputStream(sourceLoc);
  
        OutputStream out = new FileOutputStream(targetLoc);
  
        byte[] buf = new byte[1024];
        int len;
        while ((len = in.read(buf)) &gt; 0) {
        out.write(buf, 0, len);
  </code></pre>