private void moveAssets(String assets_file_path, String absolutePath) throws IOException {
File wwwFile = new File(absolutePath);
if (wwwFile.exists())
return;
InputStream is = activity.getAssets().open(assets_file_path);
byte[] buffer = new byte[is.available()];
is.read(buffer);
is.close();
wwwFile.createNewFile();
FileOutputStream os = new FileOutputStream(wwwFile);
os.write(buffer);
os.close();
}
Android java : How to copy/move file from assets to absolute path?
Subscribe to:
Post Comments (Atom)
fixed: embedded-redis: Unable to run on macOS Sonoma
Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...
-
Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...
-
Introduction In distributed systems, maintaining context across microservices is crucial for effective logging and tracing. The Mapped Di...
-
If you do not config mail up for your ghost blog, it maybe a big problem once you lost your user password. however, methods are always mor...
No comments:
Post a Comment