Java Base64 字符串转 InputStream

561 阅读1分钟
String base64Str = "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIDEzIGxhenkgZG9ncy4=";
byte[] decoded = Base64.getDecoder().decode(base64Str);
InputStream is = new ByteArrayInputStream(decoded);