求 HttpURLConnection 使用说明

lashzl 2004-07-20 03:39:37
小弟,最近用HttpURLConnection写程序,很是不爽。在用HttpURLConnection过程中,在用setRequestProper(),提示我aleady connected , 可是在这之前我已经用
disconnect()关闭过了。我用HttpURLConnection完全是根据方法名猜测其用途,可是,我发现很多方法都是不能随便使用的。
在此,向大家请教HttpURLConnection的使用说明。最好有完整的代码实例。
...全文
270 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
iversonxk 2004-08-09
  • 打赏
  • 举报
回复
A URLConnection with support for HTTP-specific features. See the spec for details.

Each HttpURLConnection instance is used to make a single request but the underlying network connection to the HTTP server may be transparently shared by other instances. Calling the close() methods on the InputStream or OutputStream of an HttpURLConnection after a request may free network resources associated with this instance but has no effect on any shared persistent connection. Calling the disconnect() method may close the underlying socket if a persistent connection is otherwise idle at that time.
yuwangjiang 2004-08-09
  • 打赏
  • 举报
回复
各位 不好意思 我不知道在那里提问 有个关于URLCONNECTION的问题

urlconnection下载多框架网页

请问哪位专家 用urlconnection下载多框架网页 怎么实现
http请求头里有多框架设置么 jdk1.4支持么
lashzl 2004-07-23
  • 打赏
  • 举报
回复
谢谢!谢谢!
Philzzf 2004-07-20
  • 打赏
  • 举报
回复
http://www.ccw.com.cn/htm/center/prog/02_6_21_3_2.asp
http://www.yesky.com/SoftChannel/72342371961929728/20030826/1724151.shtml
http://www.yesky.com/SoftChannel/72342371961929728/20030830/1725013.shtml
qqbz 2004-07-20
  • 打赏
  • 举报
回复
看帮助!

62,615

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧