首页 > 代码库 > 获取图片存储到本地

获取图片存储到本地

List<byte[]> bytesList = result.getT();
if (bytesList != null) {
   int length = bytesList.size();
   for (int i = 0; i < length; i++) {
      File file = new File("D:/" + i + ".png");
      try {
         Files.write(bytesList.get(i), file);
      } catch (IOException e) {
         
      }
   }
   return ;
}

  

获取图片存储到本地