Convert Excel to Json in Java – Apache Poi + Jackson

In the tutorial, I shows how to convert Excel File to JSON String or JSON File and vice versa with Java language by examples using Apache poi & Jackson.

* Technologies:
– Java
– Apache poi
– Jackson

What will we do?
1. Convert Excel File to JSON String
2. Convert Excel File to JSON File
3. Convert JSON String to Excel File
4. Convert JSON File to Excel File

Continue reading “Convert Excel to Json in Java – Apache Poi + Jackson”

Image to Base64 Java using Java 8 Encode Decode

Tutorial: “Convert Image to Base64 Java – Java 8 Encode Decode an Image to Base64 tutorial”

With Java 8, Base64 has finally got its due. Java 8 now has inbuilt encoder and decoder for Base64 encoding. For some purpose like transfering an image through RestfulAPI or saving an image to a DataBase, We need Encoder (Decode) the image to Base64. In the tutorial, I will guide you how to use Java 8 for converting.

Continue reading “Image to Base64 Java using Java 8 Encode Decode”

Flux to List – How to convert Reactor Flux to List/Map

Tutorial: “Flux to List – How to convert Reactor Flux to List/Map”

What is a Reactor Flux? A Flux is a Reactive Streams Publisher , augmented with a lot of operators that can be used to generate, transform, orchestrate Flux sequences. It can emit 0 to n elements ( onNext event) then either completes or errors ( onComplete and onError terminal events).
In this tutorial, I introduces ways to convert Reactor Flux into List/Map.

Related post:

Reactor – Handle Error
Reactor – How to Create Flux (Publisher) with Interval

Continue reading “Flux to List – How to convert Reactor Flux to List/Map”

Java Read/Write CSV File: Open CSV + Apache Common

A CSV is a comma-separated values file, which allows data to be saved in a tabular format. “How to read and write CSV files” is one of the most common question in Java development world. So in the tutorial, I will introduce details how to do it by clearly example coding with 2 libraries: Open CSV and Apache Common.

What we will do?

Continue reading “Java Read/Write CSV File: Open CSV + Apache Common”