|
|
| 首页 | 技术文章 | 软件下载 | 博客 | 论坛 | 精品教程 | 黑客动画 | 视频资源 | 在线服务 | 黑客游戏 | | ||||
|
|
||||||||
|
||||||||
|
|||||
| 读写远程文件并显示 | |||||
作者:不详 文章来源:CnXHacker.Net 点击数: 更新时间:2007-5-30 ![]() |
|||||
|
import java.io.*; import java.util.*; public class ReadURLFile{ public static void main(String[] args) throws Exception{ URL urlfile = new URL("http://192.168.16.34/xuys/index_.html"); BufferedReader in = new BufferedReader(new InputStreamReader(urlfile.openStream())); String content=""; String inputLine = in.readLine(); while(inputLine!=null){ content += inputLine; inputLine = in.readLine(); } System.out.println(content); in.close(); } } |
|||||
| 文章录入:IceRiver 责任编辑:IceRiver | |||||
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 | |||||
网友评论:(只显示最新5条。评论内容只代表网友观点,与本站立场无关!) |
| 关于我们 - 版权声明 - 帮助(?) - 广告服务 - 联系我们 - 友情链接 - 用户注册 - | Powered by ICE RIVER - STUDIO |
| » CnXHacker.CoM | © CopyRight 2002-2006, CnXHacker.CoM™, Inc. All Rights Reserved. |