作者CPlusPluslx (C++1X)
站内java
标题[J2SE] URL的openConnection和connect使用时机
时间Sat Jun 18 14:11:25 2011
java.net.URLConnection 官网文件说明
1.The connection object is created by invoking the
openConnection method on a URL.
2.The setup parameters and general request properties
are manipulated.
3.The actual connection to the remote object is made,
using the connect method.
4.The remote object becomes available. The header
fields and the contents of the remote object can be accessed.
可是我使用url.openConnection就可以开启连线抓东西
那connect这个函式到底有何用途?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.160.113.170