I have to decode the authorization header of an http request of the form Basic bW9uTG9naW46bW9uTW90RGVQYXNz
When I decode it online, I got the correct result monLogin:monMotDePass
.
When I try with my code :
String valueDecoded = Base64.getDecoder().decode(request.getHeader("Authorization").split(" ")[1]).toString();
System.out.println(valueDecoded.toString());
I've got this result which is not correct : [B@16d9ea61
Is there anything wrong with my line ?