Step 1:Create a new Java project via Maven as shown below, and import the project into eclipse IDE.
mvn archetype:generate -DgroupId=com.mytutorial -DartifactId=xml-to-pojo-with-moxy -DinteractiveMode=false
Step 2: The pom.xml file with the MOXy dependency.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<!-- XML (MOXy) -->
Step 3: Create a new “Source Folder” named, src/main/resources and then sub-folder “date” to create the xml file report.xml as shown…...
What is remote debugging? It is increasingly essential with the globalization to be able to debug a Java application that is deployed remotely, in another country or city. You will come across scenarios where an application might be running fine in your sandbox (i.e. local desktop), but might be buggy…...
The javap is a class file dissembler. Here are 3 scenarios you can put javap to use with code examples. #1 Finding the Java version of the class file within a jar Extract a class file say “MyJobRunner.class” from a jar file and use javap to find out the version…
Read more ›
A stream is an infinite sequence of consumable elements (i.e a data structure) for the consumption of an operation or iteration. Any Collection<T> can be exposed as a stream. It looks complex, but once you get it, it is very simple. The operations you perform on a stream can either…...
BeanIO is an open source Java framework for marshaling and marshaling Java beans from a flat file, stream, or simple String object. It is very powerful with support for XML, CSV, delimited and fixed length stream formats, Object binding, filed validation, integration with spring-batch, etc. Here is a basic tutorial…
Read more ›
BeanIO is an open source Java framework for marshaling and marshaling Java beans from a flat file, stream, or simple String object. It is very powerful with support for XML, CSV, delimited and fixed length stream formats, Object binding, filed validation, integration with spring-batch, etc. But there are scenarios where…
Read more ›
A stream is an infinite sequence of consumable elements (i.e a data structure) for the consumption of an operation or iteration. Any Collection can be exposed as a stream. The operations you perform on a stream can either be intermediate (map, filter, sorted, limit, skip,concat, substream, distinct, etc) producing another…...
Scenario 1: The Operation interface with the annotation @FunctionalInterface. This annotation ensures that you can only have a single abstract method. You can have additional default and static method implementations. Step 1: Define the interface. It is an abstract method by default, and @FunctionalInterface ensures that you can only define a…...