connect()和disconnect()在哪里实现? [英] Where is connect() and disconnect() implemented?

查看:2633
本文介绍了connect()和disconnect()在哪里实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

java.net.URLConnetion.java java.net.HttpURLConnection.java 中,只有摘要 connect() disconnect()的方法。

In java.net.URLConnetion.java and java.net.HttpURLConnection.java, there are only abstract methods for connect() and disconnect(), respectively.

@ abstract public void connect() throws IOException;
@ public abstract void disconnect();

有谁知道实现它们的实际代码在哪里?

Does anyone know where is the actual codes that implement them?

我想知道 HttpURLConnection 如何与TCP堆栈通信。

I want to know how the HttpURLConnection communicate with TCP stack.

此外,还有更抽象的函数,例如 usingProxy()。它们的代码在哪里?

Besides, there are more abstract functions, such as usingProxy(). Where is the code for them?

推荐答案

java.net.HttpURLConnection.java 有一个已实现该方法的实现 HttpsURLConnectionImpl 。它使用委托 DelegateHttpsURLConnection 扩展 AbstractDelegateHttpsURLConnection 已实现 connect()方法

java.net.HttpURLConnection.java has an implementation HttpsURLConnectionImpl that has implemented the method. It uses a delegate DelegateHttpsURLConnection that extends AbstractDelegateHttpsURLConnection which has implemented the connect() method

大多数IDE都可以跟踪所有类,对象和方法,并下载源文件。 FX。 IntelliJ 可以为您完成此操作。

Most IDE's you can track all the classes, objects and methods, and download the source files. Fx. IntelliJ can do this for you.

这篇关于connect()和disconnect()在哪里实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆