コード例 #1
0
 private Writer getFileWriter(File file) throws IOException {
   String charset = config.getTargetCharset();
   if (charset != null && charset.trim().length() > 0) {
     return new OutputStreamWriter(new FileOutputStream(file), charset);
   }
   return new FileWriter(file);
 }
コード例 #2
0
 private Template getTemplate(File file) throws IOException {
   String charset = config.getTemplateCharset();
   if (charset != null && charset.trim().length() > 0) {
     return FreemarkerFactory.getTemplate(file, charset);
   }
   return FreemarkerFactory.getTemplate(file);
 }