I have used the code example to copy my included database into FileSystemStorage. The database is copied, but the Util.copy(pi, po); line throws a NullPointerException. Anyone have any ideas? Thanks.
String pathp = Display.getInstance().getDatabasePath("players.db").toString();
if(pathp != null && !FileSystemStorage.getInstance().exists(pathp)) {
try(InputStream pi = Display.getInstance().getResourceAsStream(getClass(), "/players.db");
OutputStream po = FileSystemStorage.getInstance().openOutputStream(pathp)) {
Util.copy(pi, po);
Util.cleanup(po);
Util.cleanup(pi);
} catch(IOException err) {
Log.e(err);
}
}