摘要: 昨天在做日常时碰到了一个问题:根据图片的URL地址,返回该图片文件的byte数据。 第一种方案:通过HttpURLConnection创建连接,然后,从该连接获取图片流。 1 public class ImageReaderUtil { 2 /** 3 * @param 4 * imageUrl 5 * @return 6 * byte array of the file 7 */ 8 public static byte[] getBytesByURL(String imageUrl)throw... 阅读全文
posted @ 2011-12-09 18:04 blue-cherry 阅读(4102) 评论(1) 推荐(1)