Skip to content

Commit

Permalink
improve the default template engine
Browse files Browse the repository at this point in the history
  • Loading branch information
ydq committed Dec 23, 2018
1 parent cea5c64 commit 9925cb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/blade/kit/IOKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ public static String readToString(String file) throws IOException {
}

public static String readToString(BufferedReader bufferedReader) {
return bufferedReader.lines().collect(Collectors.joining());
return bufferedReader.lines().collect(Collectors.joining(System.lineSeparator()));
}

public static String readToString(Path path) throws IOException {
BufferedReader bufferedReader = Files.newBufferedReader(path);
return bufferedReader.lines().collect(Collectors.joining());
return bufferedReader.lines().collect(Collectors.joining(System.lineSeparator()));
}

public static String readToString(InputStream input) throws IOException {
try (BufferedReader buffer = new BufferedReader(new InputStreamReader(input, "UTF-8"))) {
return buffer.lines().collect(Collectors.joining("\n"));
return buffer.lines().collect(Collectors.joining(System.lineSeparator()));
}
}

Expand Down

0 comments on commit 9925cb1

Please sign in to comment.