我试图避免使用 FileItem getInputStream()
,因为它会得到错误的编码,因为我需要一个FileInputStream
。有没有办法在不使用这种方法的情况下获得 FileInputStream?或者我可以将我的文件项转换为文件吗?
if (this.strEncoding != null && !this.strEncoding.isEmpty()) {
br = new BufferedReader(new InputStreamReader(clsFile.getInputStream(), this.strEncoding));
}
else {
// br = ?????
}