DB_PATH = "/data/data/com.example.sampleprogname/databases/";
DB_NAME = "dbmanual.db";
...
private void copyDbFromAssetsToDevice() throws IOException {
try {
InputStream istream = context.getAssets().open(DB_NAME);
String outputFileName = DB_PATH + DB_NAME;
OutputStream ostream = new FileOutputStream(outputFileName);
byte[] buffer = new byte[1024];
int length;
while ((length = istream.read(buffer)) > 0){
ostream.write(buffer, 0, length);
}
ostream.flush();
ostream.close();
istream.close();
} catch (Exception e) {
Log.e("tle99 - copyDatabase", e.getMessage());
}
}
broker0:
ports:
- 49092:9092
broker1:
ports:
- 49093:9092
broker2:
ports:
- 49094:9092