dalvik的luni中HttpURLConnection.java为什么没有overridde getInputSteam方法

想看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

阅读 5.5k
2 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题