SyntaxFix
Write A Post
Hire A Developer
Questions
I think you might want:
String encodedFile = Base64.getEncoder().encodeToString(bytes);