public final class CrashReportPersister extends Object
CrashReportData
Constructor and Description |
---|
CrashReportPersister() |
Modifier and Type | Method and Description |
---|---|
CrashReportData |
load(File file)
Loads properties from the specified
File . |
void |
store(CrashReportData crashData,
File file)
Stores the mappings in this Properties to the specified OutputStream,
putting the specified comment at the beginning.
|
@NonNull public CrashReportData load(@NonNull File file) throws IOException, JSONException
File
.file
- Report file from which to load the CrashData.IOException
- if error occurs during reading from the File
.JSONException
- if the stream cannot be parsed as a JSON object.public void store(@NonNull CrashReportData crashData, @NonNull File file) throws IOException, JSONException
crashData
- CrashReportData to save.file
- File into which to store the CrashReportData.IOException
- if the CrashReportData could not be written to the OutputStream.JSONException
- if the crashData could not be converted to JSON.