Python の一部のコードを Java に変換しようとしています。そして、値が 63 より大きい python base64 エンコーダーに固執しました。
パイソン:
s = chr(59) + chr(234)
print(base64.b64encode(s))
>> O+o=
ジャワ
char[] chars = {59, 234};
String data = new String(chars);
byte[] encoded = Base64.encodeBase64(data.getBytes());
System.out.println(new String(encoded));
>> O8Oq
誰でもアイデアはありますか?