return ret;
}
- private static String getHTMLHeader(Properties props) throws IOException {
+ private static void appendHTMLHeader(StringBuffer sb, Properties props)
+ throws IOException {
String fileName;
File f;
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 {
news = new StringBuffer();
news.append("<html>\n");
- getHTMLHeader(props);
+ appendHTMLHeader(news, props);
news.append("<body>\n");
for (File adoc: adocs) {