You always need a Base64 encoder and decoder, but for some reason Java does
not introduce it until version 1.8, and even so there are many incompatible
libraries out there. This one does the decoding without any dependence upon
other classes, nor on a complex bloated object class hierarchy that is the
grandiose scheme of some programmer to impress others with. This
implementation is straightforward and simple to use.
To encode: simply call "encode" with the array of bytes that you want
encoded, and an encoded string is returned.
To decode: pass the string into "decode" and a byte array is returned.
That is all you need, and I am constantly amazed at how programmers can make
something as simple as this so complicated that you have to read a manual to
be able to use it.