public class DataBaseUtils
extends java.lang.Object
构造器和说明 |
---|
DataBaseUtils() |
限定符和类型 | 方法和说明 |
---|---|
static void |
copyDatabase(android.content.Context context,
java.io.File dbFile,
java.lang.String databaseName) |
android.database.sqlite.SQLiteDatabase |
getReadableDatabase(android.content.Context context,
java.lang.String databaseName)
Open a database which is used for reading only.
|
android.database.sqlite.SQLiteDatabase |
getWritableDatabase(android.content.Context context,
java.lang.String databaseName)
Open a database which is used for both reading and writing.
|
public static void copyDatabase(android.content.Context context, java.io.File dbFile, java.lang.String databaseName) throws java.io.IOException
java.io.IOException
public android.database.sqlite.SQLiteDatabase getReadableDatabase(android.content.Context context, java.lang.String databaseName) throws android.database.sqlite.SQLiteException
copyDatabase(android.content.Context, java.io.File, String)
.context
- databaseName
- android.database.sqlite.SQLiteException
public android.database.sqlite.SQLiteDatabase getWritableDatabase(android.content.Context context, java.lang.String databaseName)
copyDatabase(android.content.Context, java.io.File, String)
.context
- databaseName
-