How is it possible to convert a Array of bytes which are can not in the range of readable characters to a definable set of characters in java?
Here a example:
byte[] bytes = new byte[] { 60, 109, -73, 0, 0,
0, 0, -128, -1, -1,
-1, -121, 19, 21, 14, 0 };
String base64 = "PG23AAAAAID///+HExUOAA==";
It should be configurable which characters are available for the output. The possible characters should be: a-z and/or A-Z and/or 0-9 and/or <>|,;.:-_!"$%&/()=?*'+#~}][{
The Special characters should be able to choose single.
It there some kind of API that have this already done? And when not how should be this implemented.
The must have: the same byte[] should be the same converted string but it must not be possible to change back.