获取图片存储到本地

Posted 令狐る侠

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了获取图片存储到本地相关的知识,希望对你有一定的参考价值。

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 ;
}

  

以上是关于获取图片存储到本地的主要内容,如果未能解决你的问题,请参考以下文章