Пример #1
0
 private String _getFileContent(String path, String charset, int encodeType) {
   String content = "";
   try {
     if (encodeType == HTMLNoBREncode)
       content = StringUtil.HTMLNoBREncode(FileUtil.getFileContent(path, charset));
     else if (encodeType == HTMLEncode)
       content = StringUtil.HTMLEncode(FileUtil.getFileContent(path, charset));
     else if (encodeType == HTMLEncodej)
       content = StringUtil.HTMLEncodej(FileUtil.getFileContent(path, charset));
     else content = FileUtil.getFileContent(path, charset);
   } catch (IOException e) {
     log.error(
         "Get File Content Error:path="
             + path
             + ",charset="
             + charset
             + ",convertHtmlTag="
             + encodeType,
         e);
   }
   return content;
 }