Converting byte array to base64 string java

Viewed 52159

Trying to convert a byte[] to base64 string using org.apache.commons.codec.binary.Base64..For this my java code looks like:

 base64String = Base64.encodeBase64URLSafeString(myByteArray);

But what i see is some invalid characters in the generated base64 string..ScreenShot

Why do I see these ____ lines in my generated base64 String? Is it a valid string? Note the length of the generated string is dividable by four.

5 Answers
Related