mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-05-03 00:30:28 +00:00
09H35D06102024
This commit is contained in:
parent
05323fae73
commit
580dd8a0a0
2 changed files with 34 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ import java.io.ByteArrayOutputStream;
|
|||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
|
@ -502,4 +503,18 @@ public class VectrasApp extends Application {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void writeToFile(String filePath, String content) {
|
||||
File file = new File(filePath);
|
||||
FileOutputStream outputStream = null;
|
||||
try {
|
||||
outputStream = new FileOutputStream(file);
|
||||
outputStream.write(content.getBytes());
|
||||
outputStream.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue