Tag: API

PropertyDescriptor Example in Java In this example, We will show you simple example program about, PropertyDescriptor Example in Java. The example program has been tested and shared in the same post. POJO Class (Customer.class) package com.dineshkrish; /** * * @author Dinesh Krishnan * */ public class Customer { private int id; private String name; private […]
XMLEncoder Example in Java In this example, We will show you simple example program about, XMLEncoder Example in Java. The example program has been tested and shared in the same post. POJO Class (Customer.class) package com.dineshkrish; /** * * @author Dinesh Krishnan * */ public class Customer { private int id; private String name; private […]
Convert Object to Map in Java In this example, we will show you simple program about, How to Convert Object to Map in Java. The example program has been tested and shared in the post. Maven Dependency <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.3</version> </dependency> POJO Class (Customer.java) package com.dineshkrish; /** * * @author Dinesh Krishnan * */ […]
Converting XML to JSON in Java In this post, We will show you simple program about, How to Convert XML to JSON in Java. The example program has been tested and shared in the same post. Maven Dependency <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20170516</version> </dependency> Example Program package com.dineshkrish; import java.io.File; import java.io.IOException; import java.nio.file.Files; import org.json.JSONObject; […]
Reading PDF file using PDFBox API In this example, We will show you sample program about, How to read PDF file using PDFBox in Java. The example program has been tested and shared in the same post. Maven Dependency <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> <version>2.0.7</version> </dependency> Example Program package com.dineshkrish; import java.io.File; import java.io.IOException; import org.apache.pdfbox.pdmodel.PDDocument; import […]
Reading Text from Image using Java – Tess4J In this post, We will show you How to read text from image using Java programming language. The example program has been tested and shared in the same post. This example application (ie: Reading Text from Image) using open source API called Tess4J, The API can be […]
Converting String to Hex in Java In this example, we will show you the simple program about, how to convert a string to hex in Java. The example program has been tested and shared in the same post. Example Program (Converter.java) package com.dineshkrish; import org.apache.commons.codec.binary.Hex; /** * * @author Dinesh Krishnan * */ public class […]
Converting Hex to String in Java In this example, we will show you the simple program about, how to convert hex to string in Java. The example program has been tested and shared in the same post. Example Program (Converter.java) package com.dineshkrish; import java.io.UnsupportedEncodingException; import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.Hex; /** * * @author Dinesh Krishnan * […]
How to Generate Camel Case in Java In this example, We will show you simple java program about, How to generate camel case in Java. The program has been tested and output shared in the same post. Example Program package com.dineshkrish; /** * * @author Dinesh Krishnan * */ public class Generator { public static […]
Round Robin Example in Java In this example, We will show you simple program about, How to write Round Robin Example in Java. The example program were tested and shared in the same post. Interface (RoundRobin.java) package com.dineshkrish; /** * * @author Dinesh Krishnan * */ public interface RoundRobin<T> { public T select() throws RoundRobinException; […]
Extract Title from Web Pages in Java In this example, We will show you simple program about, How to extract title from web pages in Java. This example was build using Java Jsoup API. Which is used to process the HTML documents from URL or any source. The example program has been tested with environment […]
Extract Text from Web Pages in Java In this example, We will show you simple program about, How to extract text from web pages in Java. The following example were done using Java Jsoup api and output shared in the same post. Example Program (ExtractText.java) package com.dineshkrish; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import org.jsoup.Jsoup; […]
Enable Web Console in Apache Karaf In this post, We will show you the step by step procedure about, How to enable web console in Apache karaf. The following steps are tested with environment and shared in the post. Apache Karaf – Enable Web Console Step 1: Open the karaf terminal Step 2: Type the […]
Execute Javascript Function in Java> In this example, We will show you simple program about, How to Execute Javascript function in Java. The example program has been tested and shared in the same post. Example Program package com.dineshkrish; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import javax.script.Invocable; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; /** * * […]
Extract Links from a Website using Java In this example, We will show you simple program about, How to extract links from a website using Java. The example has been tested and output shared in the same post. Project Structure Example Program package com.dineshkrish; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import […]
Convert ResultSet to CSV in Java In this example, We will show simple program example about, How to convert ResultSet to CSV in Java. The example has been tested with MySQL database server and output shared in the same post. Project Structure Maven Configuration (pom.xml) In order to convert ResultSet to CSV in Java. We […]
Log4j Database Appender Example MySQL In this example, We will show you How to configure Log4j Database Appender example MySQL. The example was tested with MySQL environment and output has been shared in the same post. Creating Database and Table Query for creating database -> CREATE DATABASE logger; Query for creating table -> CREATE TABLE […]