private void extractDatabase() throws IOException {
final ZipInputStream zipInputStream = new ZipInputStream(DatabaseHelper.sAppContext.getAssets().open("dump.bin"));
if (zipInputStream.getNextEntry() != null) {
final byte[] array = new byte[1024];
final File file = new File(getInstance().mDbDir);
if (!file.exists()) {
file.mkdirs();
}
final BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(this.mDbDir + "dump.bin"), 1024);
while (true) {
final int read = zipInputStream.read(array, 0, 1024);
if (read == -1) {
break;
}
bufferedOutputStream.write(array, 0, read);
}
bufferedOutputStream.flush();
bufferedOutputStream.close();
}
zipInputStream.close();
}
dump.bin是数据库文件,但是我打不开,反过来我怎么编辑这个数据库文件