想看urlconnectionde getInputStream什么时候connect的,却发现HttpUrlConnection并没有复写getInputStream这个方法啊
~ANDROID_HOME/sources/android-19/java/net/URLConnection#getInputStream
/**
* Returns an {@code InputStream} for reading data from the resource pointed by
* this {@code URLConnection}. It throws an UnknownServiceException by
* default. This method must be overridden by its subclasses.
*
* @return the InputStream to read data from.
* @throws IOException
* if no InputStream could be created.
*/
public InputStream getInputStream() throws IOException {
throw new UnknownServiceException("Does not support writing to the input stream");
}
https://android.googlesource.com/platform/libcore/+/android-4.4.2_r2/luni/src/main/java/java/net/HttpURLConnection.java
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
走同样的路,发现不同的人生