X-Git-Url: https://git.wpitchoune.net/gitweb/?p=asciidoctor_to_rss.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2FMain.java;fp=src%2Fmain%2Fjava%2FMain.java;h=0dedab9fde2b01f0f0ac9e911c069fcb0842c199;hp=d0121448ca5720cd39a36cce9d3b08ac677f2de8;hb=e50967c128e1b2514fdbce8f38ba2740698c72ff;hpb=c8adf3e9a509f2db077ff551fe49c9b3ccfd7dec diff --git a/src/main/java/Main.java b/src/main/java/Main.java index d012144..0dedab9 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -52,7 +52,8 @@ public class Main { return ret; } - private static String getHTMLHeader(Properties props) throws IOException { + private static void appendHTMLHeader(StringBuffer sb, Properties props) + throws IOException { String fileName; File f; @@ -60,12 +61,12 @@ public class Main { if (fileName == null) { LOG.info(KEY_HTML_HEADER_FILE + " is not set"); - return null; + return ; } f = new File(fileName); - return new String(Files.readAllBytes(f.toPath()), - StandardCharsets.UTF_8); + sb.append(new String(Files.readAllBytes(f.toPath()), + StandardCharsets.UTF_8)); } public static void main(String[] args) throws FileNotFoundException, IOException, FeedException { @@ -104,7 +105,7 @@ public class Main { news = new StringBuffer(); news.append("\n"); - getHTMLHeader(props); + appendHTMLHeader(news, props); news.append("\n"); for (File adoc: adocs) {