Created
October 10, 2016 19:37
-
-
Save alebaffa/110a5655af39251a7992055394a999b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String convertToHtml() throws IOException { | |
return convertToHtml(new FileReader(fullFilenameWithPath)); | |
} | |
protected String convertToHtml(Reader reader) throws IOException { | |
BufferedReader bufferedReader = new BufferedReader(reader); | |
String line = bufferedReader.readLine(); | |
String html = ""; | |
while (line != null) { | |
html += StringEscapeUtils.escapeHtml(line); | |
html += "<br />"; | |
line = bufferedReader.readLine(); | |
} | |
return html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment