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.
Serialization of inner classes, including local and anonymous classes, is strongly discouraged. When the Java compiler compiles certain constructs, such as inner classes, it creates synthetic constructs; these are classes, methods, fields, and other constructs that do not have a corresponding construct in the source code. Synthetic constructs enable Java compilers to implement new Java language features without changes to the JVM. However, synthetic constructs can vary among different Java compiler implementations
M. Winikoff. Multi-Agent Programming: Languages, Platforms and Applications, volume 15 of Multiagent Systems, Artificial Societies, and Simulated Organizations, chapter 7, Springer, New York, NY, (2005)
S. Ryu, and N. Ramsey. Compiler Construction: 14th International Conference, CC 2005, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2005, Edinburgh, UK, April 4-8, 2005. Proceedings, page 10--26. Springer, (2005)
J. Broekstra, A. Kampman, and F. van Harmelen. The Semantic Web -- ISWC 2002: First International Semantic Web Conference Sardinia, Italy, volume 2342 of Lecture Notes in Computer Science, Springer, Berlin, (2002)
S. Lauterburg, R. Karmani, D. Marinov, and G. Agha. Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering, page 363--364. New York, NY, USA, ACM, (2010)