public class AssetDatabaseOpenHelper
extends java.lang.Object
SQLiteDatabase
, use getWritableDatabase()
to create and/or open a database
that will be used for reading and writing. use getReadableDatabase()
to create and/or open a database that
will be used for reading only.Constructor and Description |
---|
AssetDatabaseOpenHelper(Context context,
java.lang.String databaseName) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDatabaseName() |
SQLiteDatabase |
getReadableDatabase()
Create and/or open a database that will be used for reading only.
|
SQLiteDatabase |
getWritableDatabase()
Create and/or open a database that will be used for reading and writing.
|
public AssetDatabaseOpenHelper(Context context, java.lang.String databaseName)
public SQLiteDatabase getWritableDatabase()
java.lang.RuntimeException
- if cannot copy database from assetsSQLiteException
- if the database cannot be openedpublic SQLiteDatabase getReadableDatabase()
java.lang.RuntimeException
- if cannot copy database from assetsSQLiteException
- if the database cannot be openedpublic java.lang.String getDatabaseName()