title: Unable to copy from assets folder to sdcard
body: <p>I'm trying to copy from my assets folder to my sd card but everytime i tried it always said file not found. Here is my code :</p>
  
  <pre><code>  if (!(new File(Environment.getExternalStorageDirectory() + "tessdata/eng.traineddata"))
                  .exists()) {
              try {
  
                  AssetManager assetManager = getAssets();
                  InputStream in = assetManager.open("/assets/tessdata/eng.traineddata");
                  // GZIPInputStream gin = new GZIPInputStream(in);
                  OutputStream out = new FileOutputStream(Environment.getExternalStorageDirectory()
                          + "tessdata/eng.traineddata");
  
                  // Transfer bytes from in to out
                  byte[] buf = new byte[1024];
                  int len;
                  // while ((lenf = gin.read(buff)) &gt; 0) {
                  while ((len = in.read(buf)) &gt; 0) {
                      out.write(buf, 0, len);
                  }
                  in.close();
                  // gin.close();
                  out.close();
  
                  Log.d("", "Copied eng.traineddata");
              } catch (IOException e) {
                  Log.d("",
                          "Was unable to copy eng.traineddata "
                                  + e.toString());
              }
          }
  </code></pre>
  
  <p>can someone help me?</p>