注意:为避免中文乱码,在读取或写入一定要进行编码转换。
如:
InputStream in = Find.class.getClassLoader().getResourceAsStream(fileName);
InputStreamReader reader = new InputStreamReader(in,"GBK");
注意:为避免中文乱码,在读取或写入一定要进行编码转换。
如:
InputStream in = Find.class.getClassLoader().getResourceAsStream(fileName);
InputStreamReader reader = new InputStreamReader(in,"GBK");