socket和URLConnection
摘要:
这两者都可以发送消息流,URLConnection是socket的高层封装。URLConnection使用get>: HttpURLConnection conn = url.openConnection(); int responseCode = conn.getResponseCode(); ...post>: HttpURLConnection conn = url.openConnection(); conn.setRequestProperty("Content-Length",100); ... out = conn.getOutputStream( 阅读全文
posted @ 2012-11-05 17:54
5567
阅读(216)
评论(0)
推荐(0)
浙公网安备 33010602011771号