永发信息网

java如何调用对方http接口 新手虚心求教

答案:2  悬赏:0  手机版
解决时间 2021-03-11 01:12
  • 提问者网友:火车头
  • 2021-03-10 08:26
java如何调用对方http接口 新手虚心求教
最佳答案
  • 五星知识达人网友:像个废品
  • 2021-03-10 10:04
java如何调用对方http接口
按Alt+B可进入Break/watch菜单, 该菜单有以下内容,如图所示:
1. Add watch: 向监视窗口插入一监视表达式。
2. Delete watch:从监视窗口中删除当前的监视表达式。
3. Edit watch:在监视窗口中编辑一个监视表达式。
4. Remove all :watches从监视窗口中删除所有的监视表达式。
5. Toggle breakpoint:对光标所在的行设置或清除断点。
6. Clear all breakpoints:清除所有断点。
7. View next breakpoint:将光标移动到下一个断点处。
全部回答
  • 1楼网友:鸠书
  • 2021-03-10 10:49
public static string geturlcontent(string urlstr) { url url = null; httpurlconnection httpconn = null; bufferedreader in = null; stringbuffer sb = new stringbuffer(); try { url = new url(urlstr); in = new bufferedreader(new inputstreamreader(url.openstream(), "gbk")); string str = null; while ((str = in.readline()) != null) { sb.append(str); } } catch (exception ex) { } finally { try { if (in != null) { in.close(); } } catch (ioexception ex) { } } string result = sb.tostring(); system.out.println(result); return result; }
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯