public boolean getRource(String source) {
try {
URL url = new URL(source);
URLConnection uc = url.openConnection();
InputStream in = uc.getInputStream();
if (source.equalsIgnoreCase(uc.getURL().toString()))
in.close();
return true;
} catch (Exception e) {
return false;
}
}
JAVA_判断网络给定地址图片是否存在
最新推荐文章于 2024-06-07 12:22:19 发布