从URL获取流
/* 时 代 J a v a - N o w J a v a . c o m 提供 */ //package com.nowjava; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; public class Main { public static InputStream getStreamFromURL(String imageURL) { InputStream in = null; try { URL url = new URL(imageURL); HttpURLConnection connection = (HttpURLConnection) url .openConnection(); in = connection.getInputStream(); /* N o w J a v a . c o m - 时 代 Java 提 供 */ } catch (Exception e) {