Artikel ini menjelaskan metode Java menggunakan format UTF8 untuk menyimpan file teks. Bagikan untuk referensi Anda, sebagai berikut:
FileOutputStream fos = null; outputStreamWriter writer = null; coba {file file = File baru (FilePath); sumber daya);} catch (Exception e) {checkxmlutil.adderrormsg (checkxmlutil.text_fomart_error, checkxmlutil.save_xml_fiall, e); } catch (ioException e1) {checkxmlutil.adderrormsg (checkxmlutil.text_fomart_error, checkxmlutil.save_xml_fiall, e1);} if (writer! = null) {try {writer.close (); Checkxmlutil.Saya harap artikel ini akan membantu pemrograman Java semua orang.