Secure store replacements for the file opening methods in the android.content.Context class. More...
This class contains methods to open files in the BlackBerry Dynamics secure store, for reading or writing.
The methods in this class have the same names and prototypes as the file opening methods in the android.content.Context
class. This class is intended to facilitate migration of an application to the BlackBerry Dynamics platform.
The methods in this class have the same programming interface as the methods with the same names in the android.content.Context
class, with the following exceptions.
MODE_
constants.
The methods in this class offer the same capabilities as the constructors in the FileInp
utStream
and FileOutp
utStream
classes.
android.content.Context
class reference on the android.com website. Static Public Member Functions | |
static FileInputStream | openFileInput (String name) throws FileNotFoundException |
Open a file in the secure store, for reading, from a String containing the path. More... | |
static FileOutputStream | openFileOutput (String name, int mode) throws FileNotFoundException |
Open a file in the secure store, for writing, from a String containing the path. More... | |
static String | getAbsoluteEncryptedPath (String name) |
This function returns the encrypted path for a file or directory within the secure file system. More... | |
Static Public Attributes | |
static final int | MODE_PRIVATE = 0 |
Constant for selecting overwrite mode when opening a file for writing. More... | |
static final int | MODE_APPEND = 32768 |
Constant for selecting append mode when opening a file for writing. More... | |
|
static |
Call this method to open a file in the secure store, for reading.
name | String containing the path of the file to open, in the secure file system. |
FileInputStream
for the open file.FileNotFoundException | |
com.good.gd.error.GDNotAuthorizedError | if BlackBerry Dynamics authorization processing has not yet completed. |
|
static |
Call this method to open a file in the secure store, for writing. If a file already exists at the specified path, the file can either be appended to, or overwritten.
name | String containing the path of the file to open, in the secure file system. |
mode | Selects the action to take if a file already exists at the specified path in the secure file system: MODE_APPEND to append, or just MODE_PRIVATE to truncate. |
FileOutputStream
for the open file.FileNotFoundException | |
com.good.gd.error.GDNotAuthorizedError | if BlackBerry Dynamics authorization processing has not yet completed. |
|
static |
The principal usage for this function is to provide a path that is compatible with the SQL ATTACH command.
name | String containing the path within the secure store. |
String
containing the absolute path of the encrypted file in the native file system.
|
static |
This value can be passed as the mode
parameter of a openFileOutput call.
|
static |
This value can be passed as the mode
parameter of a openFileOutput call.