base64 di java

String originalInput = "test input";
String encodedString = Base64.getEncoder().encodeToString(originalInput.getBytes());
Defiant Dove