Commit 8da4c9fe authored by Nicolas Peifer's avatar Nicolas Peifer

refactoring (extract method)

parent 0f8261b8
......@@ -8,6 +8,7 @@ package org.codecoop.iceflower.gutenbergutils.html;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
......@@ -54,6 +55,10 @@ public class HtmlWriter {
* @throws IOException
*/
public void writeHtml(String language) throws IOException {
writeBooksIndexedByAuthor(language);
}
private void writeBooksIndexedByAuthor(String language) throws IOException, FileNotFoundException {
List<String> firstLetterOfAuthorList = IntStream.rangeClosed('A', 'Z').mapToObj(i -> "" + (char) i)
.collect(Collectors.toList());
firstLetterOfAuthorList.add(NO_AUTHOR);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment