Get web site source code
public String getPageSource() {
StringBuffer sb = new StringBuffer();
try {
// 构建一URL对象
URL url = new URL(pageUrl);
// 使用openStream得到一输入流并由此构造一个BufferedReader对象
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), pageEncode));
String line;
// 读取www资源
while ((line = in.readLine()) != null) {
sb.append(line);
}
in.close();
} catch (Exception ex) {
System.err.println(ex);
}
return sb.toString();
}
Get web site source code的更多相关文章
- Web site collections
Integration 伯乐在线 极客头条 Hacker News Stack Overflow RFC Search Security Python Hacker - Freebuf PrimalS ...
- Best Practices for Speeding Up Your Web Site
The Exceptional Performance team has identified a number of best practices for making web pages fast ...
- Drupal与大型网站架构(译)- Large-Scale Web Site Infrastructure and Drupal
Drupal与大型网站架构(译)- Large-Scale Web Site Infrastructure and Drupal Linuxjournal 网站经典文章翻译,原文地址: Large-S ...
- [转载]Best Practices for Speeding Up Your Web Site
原文:http://developer.yahoo.com/performance/rules.html 提升网站加载速度的一些优化技巧,大部分在前端层面. 不知道是多久以前写的,看起来有些已经过时了 ...
- 走进云背后:微软Azure web 项目通过web service部署web site
探索云那不为人知的故事(一):Web Services部署web site 前奏:Windows Azure是微软基于云计算的操作系统,现在更名为“Microsoft Azure”,和Azure Se ...
- [解决]ASP.NET MVC 4/5 源码调试(source code debug)
========================ASP.NET MVC 4============================ ASP.NET MVC 4 source code download ...
- XML.ObjTree -- XML source code from/to JavaScript object like E4X
转载于:http://www.kawa.net/works/js/xml/objtree-try-e.html // ========================================= ...
- Learning from the CakePHP source code - Part I
最近开始痛定思痛,研究cakephp的源码. 成长的路上从来没有捷径,没有小聪明. 只有傻傻的努力,你才能听到到成长的声音. 下面这篇文章虽然过时了,但是还是可以看到作者的精神,仿佛与作者隔着时空的交 ...
- Source Code Review
1.berfore we talking abnout the Source Code review,here's what we want to know about the most popula ...
随机推荐
- smbfs
Hi I tried to mount a network share (smbfs) but it complains about the lack of kernel support. To so ...
- Hive动态分区和分桶(八)
Hive动态分区和分桶 1.Hive动态分区 1.hive的动态分区介绍 hive的静态分区需要用户在插入数据的时候必须手动指定hive的分区字段值,但是这样的话会导致用户的操作复杂度提高,而且在 ...
- 一个javascript面试题
javascript面试题代码: <script type="text/javascript"> function fun(x,y){ console.log(&quo ...
- 【AGC003 E】Sequential operations on Sequence
Description 你有一个长度为 \(n\) 的序列,第 \(i\) 项为 \(i\). 有 \(m\) 次操作,每次操作给定一个 \(x\),你需要将序列无限循环后截取前 \(x\) 项,作为 ...
- hashmap C++实现分析及std::unordered_map拓展
今天想到哈希函数,好像解决冲突的只了解了一种链地址法而且也很模糊,就查了些资料复习一下 1.哈希Hash 就是把任意长度的输入,通过哈希算法,变换成固定长度的输出(通常是整型),该输出就是哈希值. 这 ...
- linux 远程配置docker加速器
https://www.jianshu.com/p/dca49964af04 curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh ...
- Linux安装JAVA web环境
一:安装jdk 1.下载 在oracle下载东西的时候因为oracle的一些验证机制,所以需要在链接前面添加一些参数 wget --no-check-certificate --no-cookie ...
- 题解 【NOI2010】超级钢琴
[NOI2010]超级钢琴 Description 小Z是一个小有名气的钢琴家,最近C博士送给了小Z一架超级钢琴,小Z希望能够用这架钢琴创作出世界上最美妙的音乐. 这架超级钢琴可以弹奏出n个音符,编号 ...
- Remote API(RAPI)之 系统信息
RAPI提供了一些取系统信息的函数 CeGetSystemInfo:返回当前系统信息 CeGetSystemMetrics:获取Windows元素的尺寸和系统设置 CeGetVersionEx:获取当 ...
- 基于node.js的websocket上传小功能
一.node.js 在目录里新建index.js var ws = require("nodejs-websocket"); console.log("开始建立连接... ...