File String File(String). , File ; .
, , , , , :
try {
Writer f = new FileWriter(nameOfFile);
f.write(stringToWrite);
f.close();
} catch (IOException e) {
e.printStackTrace();
}
FileWriter , . , , FileOutputStream OutputStreamWriter. :
String encoding = "UTF-8";
Writer f = new OutputStreamWriter(new FileOutputStream(nameOfFile), encoding);