读取一个文件内容,Windows系统下一切正常 移植到Linux系统下出现乱码 应该如何解决
取得文件代码如下:
FileInputStream fis = new FileInputStream( destFile );
byte[] bytes = new byte[ (int)destFile.length() ];
fis.read( bytes );
fis.close();
String result = new String( bytes );
return result;
取得文件代码如下:
FileInputStream fis = new FileInputStream( destFile );
byte[] bytes = new byte[ (int)destFile.length() ];
fis.read( bytes );
fis.close();
String result = new String( bytes );
return result;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货