findBugs 这个报的是什么异常 InputStreamReader fileData = new InputStreamReader(file); 以前一直都是这样写,但这次用findBugs来检查报了异常,异常如下:
Bug: Found reliance on default encoding in trust.cpic.pub.pubfunc.ReadFile(String, int, int): new java.io.InputStreamReader(InputStream)
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.