Extract file from .apk?
<p>in my android app I'm using an own java library that extracts a <code>.db</code>-file from jar. In Java desktop it works well, but when I try to do it on android, the inputstream blocks forever. The copy method looks like this:</p>

<pre><code>InputStream in = classloader.getResourceAsStream(...);
OutputStream out = new FileOutputStream(new File(...));
try {
  while ((read = in.read()) != -1) {
    out.write(read);
  }
} finally {
  try {
    in.close();
  } catch (final Exception e) {
    LOGGER.debug("Error", e);
  }

  try {
    out.close();
  } catch (final Exception e) {
    LOGGER.debug("Error", e);
  }
}
</code></pre>

<p>I want to copy this file to the external files dir and <code>android.permission.WRITE_EXTERNAL_STORAGE</code> is granted.</p>

<p>Is there a way to access the file in <code>/data/app/...apk</code>? If not, how can I detect that it can not be accessed without blocking forever?</p>
