生活随笔
收集整理的這篇文章主要介紹了
生成用户默认头像
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
生成用戶默認頭像
@Testpublic void getPng(){String simpleUUID
= IdUtil
.simpleUUID();StringBuilder stringBuilder
=new StringBuilder();stringBuilder
.append("https://www.gravatar.com/avatar/").append(simpleUUID
+".png").append("?f=y&").append("d=identicon&").append("r=g");long size
= HttpUtil
.downloadFile(stringBuilder
.toString(), FileUtil
.file("E:\\touxiang\\"));System
.out
.println("Download size: " + size
);}
總結
以上是生活随笔為你收集整理的生成用户默认头像的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。