标签:stream append cep build === == span exception public
public static String openFile(MultipartFile file) {
try {
BufferedReader bis = new BufferedReader(new InputStreamReader(file.getInputStream()));
StringBuilder szContent = new StringBuilder();
String szTemp;
while ((szTemp = bis.readLine()) != null) {
szContent.append(szTemp);
}
bis.close();
return szContent.toString();
} catch (Exception e) {
logger.error("open file fail ===》", e);
return "";
}
}
标签:stream append cep build === == span exception public
原文地址:https://www.cnblogs.com/LTmei/p/9779301.html