Exchange Images between Client & Server is a common problem in programming. So in the tutorial: How to transfer an Image with RestfulAPI – Image RestfulApi, JavaSampleApproach will guide you how to build a restful Api for exchanging images with Spring Boot & Spring RestTemplate & Java8-Base64
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, JavaSampleApproach will guide you how to use Java 8 for converting.
Related post: Java 8 Base64
Java 8 Base64 provides a standard way to do Base64 encoding and decoding.
There are three types of Base64 encoding:
– Basic: Encoder produces a set of characters within A-Za-z0-9+/. Decoder rejects any character NOT mapped to A-Za-z0-9+/.
– URL: Encoder produces a URL or safe filename which is set of characters within A-Za-z0-9+_.
– MIME: Output is mapped to MIME friendly format.