Skip to content

Instantly share code, notes, and snippets.

@acontal
Last active January 3, 2016 12:29
Show Gist options
  • Save acontal/8463060 to your computer and use it in GitHub Desktop.
Save acontal/8463060 to your computer and use it in GitHub Desktop.
[android] Copy asset to file system
// Dependency: Guava
// From an Activity, assets = getAssets();
// From a test, assets = getInstrumentation().getContext().getAssets();
ByteStreams.copy(assets.open(assetFileName), new FileOutputStream(targetPath));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment