url.openStream()和url.openConnection().getInputStream()两者区别

http://blog.csdn.net/ewili/article/details/8799693

下面是url.openStream()的源码:

public final InputStream openStream() throws java.io.IOException {
         return openConnection().getInputStream();
}
他也是先通过openConnection()方法获取URLConnection对象,然后调用getInputStream()方法。






你可能感兴趣的:(android)