Chinaunix首页 | 论坛 | 博客
  • 博客访问: 286329
  • 博文数量: 68
  • 博客积分: 1474
  • 博客等级: 上尉
  • 技术积分: 616
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-12 12:07
文章分类

全部博文(68)

文章存档

2011年(68)

分类: 嵌入式

2011-09-28 22:18:28


  1.    2. class hello
  2.    3. {
  3.    4. public static void main(String args[])
  4.    5. {
  5.    6. String url="";
  6.    7. try
  7.    8. {
  8.    9. for(;;)
  9.   10. {
  10.   11. Thread.sleep(10000);
  11.   12. URL hp=new URL(url);
  12.   13. URLConnection hpCon=hp.openConnection();
  13.   14. int len=hpCon.getContentLength();
  14.   15. System.out.println(len);
  15.   16. }
  16.   17. }
  17.   18. catch(Exception e)
  18.   19. {
  19.   20. ////////
  20.   21. //how to write??
  21.   22. }
  22.   23. }
  23.   24. }
阅读(2426) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~