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 ...
随机推荐
- aipai服务架构
概述 业务服务器30+ 1.根据业务不同,有四个主入口,负责负载均衡. 2.主要是业务分离,防止宕机影响所有业务. 3.nginx反向代理,保证每个业务至少有两个服务. redis集群12台 主要使用 ...
- odoo标识符
class Book(models.Model): _name = "library.book" _description = "Book" _order = ...
- three.js之创建一条直线
<!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>My first thr ...
- centos nginx https 配置
1,如果想配置一个域名到指定目录咋弄呢?下面这个 server { listen ; server_name 这里换成你的域名,例如baidu.com; set $root_path '/home/w ...
- CentOS 安装 elasticsearch 注意点
注意点: 1. 从官网下载以 rpm 结尾的软件包 7.3.1版本 下载地址: https://artifacts.elastic.co/downloads/elasticsearch/elastic ...
- Excel种的数据类型研究【原创】【精】
因为要做一个项目,开始研究Excel种的数据类型.发现偌大的一个cnblogs竟然没人写这个,自己研究以后记录下来. 在我们通常的认识中,Excel中的数据类型有这么几种 1.常规:2.数值:3.货币 ...
- (五) 结构化查询语言SQL——3
4. 数据更新 1)增 对应INSERT语句.格式为INSERT INTO T[(A1,…,Ak)] VALUES (C1,…,Ck),其中A代表表T的属性,C代表常量,A可以缺省,此时C必须严格按 ...
- table 表格
标签 <table> 标签定义HTML中的表格 <tr> 标签定义表格中的行. <th> 标签定义表格中表头的每一项.元素内部的文本通常会呈现为居中的粗体文本. ...
- 【CUDA 基础】0.0 腾讯云CUDA环境搭建
title: [CUDA 基础]0.0 腾讯云CUDA环境搭建 categories: CUDA Freshman tags: CUDA 环境搭建 toc: true date: 2018-02-13 ...
- sh_20_for语法演练
sh_20_for语法演练 for num in [1, 2, 3]: print(num) if num == 2: break else: # 如果循环体内部使用break退出了循环 # else ...