{{theTime}}

Search This Blog

Total Pageviews

Bad Practice: XML encoding issue using a local string variable (String readXml = Utils.readXmlFile("test.xml"))

Reading xml to a String variable is a bad idea. XML header contains the encoding meta data. When reading a file you have to know the encoding beforehand.  Also storing an XML file in a String is waste of memory.  XML parsers accept an Input Stream as a parsing source and figure out the encoding themselves correctly.  

No comments:

java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport

SpringBoot Error: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.j...