CoVer_App/app/src/main/java/com/example/cover_a01/StorageReadWrite.java
/**
     * Writes given variable data to file at filename in androids storage.
     */
Writes given variable data to file at filename in androids storage.
Writes given variable data to file at filename in androids storage .
static void writeToFile(String data, String filename, Context context) {
        try {
            FileOutputStream fileOutputStream = new FileOutputStream(new File(context.getFilesDir() + "/" + filename));
            OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream);
            outputStreamWriter.write(data);
            outputStreamWriter.close();
        }
        catch (IOException e) {
            Log.e("Exception", "File write failed: " + e.toString());
        }
    }
static void writeToFile ( String data , String filename , Context context ) { try { FileOutputStream fileOutputStream = new FileOutputStream ( new File ( context . getFilesDir ( ) + "/" + filename ) ) ; OutputStreamWriter outputStreamWriter = new OutputStreamWriter ( fileOutputStream ) ; outputStreamWriter . write ( data ) ; outputStreamWriter . close ( ) ; } catch ( IOException e ) { Log . e ( "Exception" , "File write failed: " + e . toString ( ) ) ; } }
Writes given variable data to file at filename in androids storage.
Writes given variable data to file at filename in androids storage .