监测url是否包含图片
URLConnection connection = new URL("http://foo.bar/3afv").openConnection();?
String contentType = connection.getHeaderField("Content-Type");?
boolean image = contentType.startsWith("image/");?
发布时间: 2012-09-13 09:51:53 作者: rapoo
监测url是否包含图片
URLConnection connection = new URL("http://foo.bar/3afv").openConnection();?
String contentType = connection.getHeaderField("Content-Type");?
boolean image = contentType.startsWith("image/");?