Reputation: 45
I have coded the following code to encode the byte[] str.
Byte[] str;
Byte[] encoded=Base64.encodeToString(str);
But Base64 word is not defined
I tried base64.encode() & base64.getEncoder()
I found a defined statement But I don't know how to use it:
byte[] encoded=Base64.encoder()
How to use it? Or how can I encode a string or byte[] with or without libraries.
Upvotes: 1
Views: 171