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的更多相关文章

  1. Web site collections

    Integration 伯乐在线 极客头条 Hacker News Stack Overflow RFC Search Security Python Hacker - Freebuf PrimalS ...

  2. Best Practices for Speeding Up Your Web Site

    The Exceptional Performance team has identified a number of best practices for making web pages fast ...

  3. Drupal与大型网站架构(译)- Large-Scale Web Site Infrastructure and Drupal

    Drupal与大型网站架构(译)- Large-Scale Web Site Infrastructure and Drupal Linuxjournal 网站经典文章翻译,原文地址: Large-S ...

  4. [转载]Best Practices for Speeding Up Your Web Site

    原文:http://developer.yahoo.com/performance/rules.html 提升网站加载速度的一些优化技巧,大部分在前端层面. 不知道是多久以前写的,看起来有些已经过时了 ...

  5. 走进云背后:微软Azure web 项目通过web service部署web site

    探索云那不为人知的故事(一):Web Services部署web site 前奏:Windows Azure是微软基于云计算的操作系统,现在更名为“Microsoft Azure”,和Azure Se ...

  6. [解决]ASP.NET MVC 4/5 源码调试(source code debug)

    ========================ASP.NET MVC 4============================ ASP.NET MVC 4 source code download ...

  7. XML.ObjTree -- XML source code from/to JavaScript object like E4X

    转载于:http://www.kawa.net/works/js/xml/objtree-try-e.html // ========================================= ...

  8. Learning from the CakePHP source code - Part I

    最近开始痛定思痛,研究cakephp的源码. 成长的路上从来没有捷径,没有小聪明. 只有傻傻的努力,你才能听到到成长的声音. 下面这篇文章虽然过时了,但是还是可以看到作者的精神,仿佛与作者隔着时空的交 ...

  9. Source Code Review

    1.berfore we talking abnout the Source Code review,here's what we want to know about the most popula ...

随机推荐

  1. 怎么处理Win7电脑打开软件速度慢的情况?

    很多使用Win7系统的用户都会发现这么一个问题,就是电脑在使用过一段时间后,打开一个应用软件的速度就会变慢,非常耽误时间.下面就和大家分享一个解决Win7系统应用软件打开速度慢的小技巧. Win7系统 ...

  2. PAT Basic 1094 谷歌的招聘 (20 分)

    20 5 23654987725541023819 输出样例 1: 49877 输入样例 2: 10 3 2468024680 输出样例 2: 404 #include <iostream> ...

  3. 【2017中国大学生程序设计竞赛-哈尔滨站】B - K-th Number

    原题: 题意: 给你一个长度为N的正整数组A,对于这个数组的所有子区间,若长度小于k则不管它,若长度大于等于k则取第k大放入数组B 问你B中第M大的数是谁 一眼序列分治,然而没思路 数据结构?能想到从 ...

  4. Vue错误集

    1.Component template should contain exactly one root element. If you are using v-if on multiple elem ...

  5. UVa10615 Andy's First Dictionary(集合set)

    这道题主要用到了set容器和stringstream,用起来非常方便,我第一次见识到,觉得十分的炫酷…… 而且,竟然可以将自己写的单词按照字典序排列,真的太酷了. 下面是书上的代码,目前还处于初学状态 ...

  6. 一例jsonp跨域访问

    对于网站A,有一链接 '/auth/list',返回json数据 {, , , , , },{, , , , , }]} 网站b某页面下可以这样写jsonp get请求 <script> ...

  7. html 与 jsp 文件格式区别

    html 与 jsp 文件格式区别 html5 <!DOCTYPE html> <html> <head> <meta charset="UTF-8 ...

  8. 怎么理解vue中$listeners属性?

    首先,$listeners是什么? 假设有父组件Parent和子组件Child // Parent <template> ... <child v-on:event-one=&quo ...

  9. Bootloader - Main system - Recovery的三角关系

    原文地址:http://blog.csdn.net/myarrow/article/details/8115610 一.MTD分区:BOOT:        boot.img,Linux kernel ...

  10. MessagePack Java 0.6.X List, Map 对象的序列化和反序列化

    为了序列化原生的容器对象例如  List 和 Map 对象,你必须使用 Template. Template 对象是 serializer 和 deserializer 的配对.例如,为了序列化一个  ...