java将图像的URL字符串转换为字节数组
我有一个来自Spring RestTemplate的图像内容get
结果:
String url = "https://is2-ssl.mzstatic.com/image/" +
"thumb/Purple114/v4/15/a1/68/15a1681f-dec4-b01f-4362" +
"-e9ff1ece9c09/AppIcon-1x_U007emarketing-0-10-0-0-85" +
"-220-0.png/60x60bb.png";
String imageAsString = restTemplate.getForObject(url, String.class);
我知道这不是通过^{
如何将该值转换为右图像字节数组格式
imageAsString.getBytes()
->;这与restTemplate.getForObject(url, byte[].class);
不同
共 (0) 个答案