📜  groovy BASE64 编码 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:15.585000             🧑  作者: Mango

代码示例1
def s = 'Argh, Groovy you say, mate?'
 
String encoded = s.bytes.encodeBase64().toString()
assert 'QXJnaCwgR3Jvb3Z5IHlvdSBzYXksIG1hdGU/' == encoded
 
byte[] decoded = encoded.decodeBase64()
assert s == new String(decoded)