Articles, dummyCategory

JDK9’s ForkJoinPool Upgrades

While everyone’s busy with modularity, local-variable-type-inference, and other Next Big Things of recent JDK releases, there’s a fairly small and important update for the ForkJoinPool that deserves some attention. ForkJoinPool was an experiment brought to life by JDK 7 and attracted a lot of attention at that time – it’s main selling point was the…

Articles, dummyCategory

Java Unescape HTML to String Example – HowToDoInJava

Java examples to unescape the characters in a String. It unescapes a string containing entity escapes to a string containing the actual Unicode characters corresponding to the escapes. StringEscapeUtils.unescapeHtml4() [Apache Commons Text] This method takes escaped string as parameter. It can be null. It supports all known HTML 4.0 entities. To use StringEscapeUtils, import commons-text …

Articles, Home

Java String to XML – Parse String to XML DOM Example – HowToDoInJava

In Java, XML is represented with org.w3c.dom.Document object. In this XML tutorial, we will learn to – Convert XML string to XML Document Convert XML file content to XML Document 1) Convert String to XML Document To convert XML string to XML Dom, we need following classes: javax.xml.parsers.DocumentBuilder : Defines the API to obtain XML …

Articles, dummyCategory

Java Convert Properties File to XML File – HowToDoInJava

Java example to create XML file from Properties object or any existing .properties file. Create XML File from Properties File To convert properties file into XML file, best way is to use java.util.Properties class. Process is : Load properties file into java.util.java.util.Properties class object. Use Properties.storeToXML() method to write the content as XML. Input Properties …