Creating BufferedReader from Files.newBufferedReader
when running the application it may throw the following exception:
java.nio.charset.MalformedInputException: Input length = 1
new BufferedReader(new InputStreamReader(new FileInputStream("a.txt"),"utf-8"));
The different is that, the former uses CharsetDecoder default action.
The default action for malformed-input and unmappable-character errors is to report them.
while the latter uses the REPLACE action.