properties 导入外部汉语文件
properties 导入外部中文文件
1、读写文件:编码是UTF8。
private Properties prop = new Properties();
prop.load(new InputStreamReader(xx(当前类).class.getResourceAsStream("需要导入的文件(放在当前类下).txt"),"UTF-8"));
1、读写文件:编码是UTF8。
private Properties prop = new Properties();
prop.load(new InputStreamReader(xx(当前类).class.getResourceAsStream("需要导入的文件(放在当前类下).txt"),"UTF-8"));