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?
I want to know how the HttpURLConnection communicate with TCP stack.
Besides, there are more abstract functions, such as usingProxy(). Where is the code for them?
解决方案
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
Most IDE's you can track all the classes, objects and methods, and download the source files. Fx. IntelliJ can do this for you.