- 浏览: 187258 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (83)
- J2EE/Core Java (24)
- J2EE/Portal (2)
- J2EE/UI (4)
- J2EE/ATG (1)
- J2EE/Report (1)
- J2EE/Web Service/Rest API (2)
- Design Pattern (2)
- Arithmetic (4)
- Linux (12)
- Ruby&Rails (17)
- Database (5)
- J2EE/Payment (1)
- J2EE/JVM (1)
- Encryption/Decryption (3)
- J2EE/Multi Threading (4)
- SQL (1)
- https://community.teamviewer.com/t5/Knowledge-Base/Where-can-I-download-older-TeamViewer-versions-nbsp/ta-p/7729 (0)
最新评论
TestCode
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; public class DownloadHelper { public static void HttpClientDownload(String remoteFile) { HttpClient client = new DefaultHttpClient(); HttpGet httpGet = new HttpGet(remoteFile); try { HttpResponse response = client.execute(httpGet); InputStream in = response.getEntity().getContent(); FileOutputStream out = new FileOutputStream(new File("C:\\log\\123.xls")); byte[] b = new byte[1024]; int len = 0; while ((len = in.read(b)) != -1) { out.write(b, 0, len); } in.close(); out.close(); } catch (IOException e) { e.printStackTrace(); } } public static void HtmlUnitDownload(String remoteFile) { try { final WebClient webClient = new WebClient(); InputStream in = webClient.getPage(remoteFile).getWebResponse().getContentAsStream(); FileOutputStream out = new FileOutputStream(new File("C:\\log\\report.xls")); byte[] b = new byte[1024]; int len = 0; while ((len = in.read(b)) != -1) { out.write(b, 0, len); } in.close(); out.close(); } catch (IOException e) { e.printStackTrace(); } } }
- springside.zip (769.3 KB)
- 下载次数: 4
发表评论
-
Start tomcat with port 80 without Linux root user-Use iptables mapping
2016-05-25 17:39 830引用In linux system. only root us ... -
Format XML in JAVA
2016-01-11 12:23 600public static String format ... -
HttpURLConnection下载文件
2015-08-07 11:25 792public class HttpDownloadUtilit ... -
Ehcache RMI Replicated Cluster(RMI集群)
2013-04-25 23:39 1067引用本文是ehcache RMI集群的例子,导入附件中的jav ... -
Integrete unitils for database(dao) testing
2013-02-01 18:39 1691引用Database testing Unit tests f ... -
JAXB入门
2012-10-16 11:59 785引用jaxb是一个读写xml的工具,还可以提供验证,不需要额外 ... -
Freemarker使用入门
2012-10-16 11:54 1017引用freemarker是一种模板标记工具,可以做页面静态化, ... -
perforce java api使用
2012-10-16 11:43 1253引用perforce是种版本管理软件,提供啦完整的java a ... -
XPath 入门
2012-10-16 11:29 878引用xpath可以快速定位获取XML文件中指定属性和值,jdk ... -
Java File Diff-diffutils
2012-09-27 17:35 74441. Maven Dependency <depende ... -
XSD 入门使用
2012-09-18 23:20 774<?xml version="1.0" ... -
nexus-2.1.1安装及使用入门
2012-08-13 22:52 14441. 安装 地址http://www.sonatype.org ... -
File Demo
2012-06-25 22:55 1307package org.springside.examples ... -
Java 访问sharepoint webservice(NTLM & SSL)
2012-06-12 09:47 3771引用遇到需要使用java访问微软的sharepoint的web ... -
Selenium Web Driver入门
2012-05-27 23:17 58351 What is Selenium? 引用Selenium ... -
HttpClient4.1.2 & HtmlUnit2.9 NTLM 验证 和 Httpclient4.1.2 https/SSL
2012-01-09 18:13 15941. HttpClient4.1.2 & HtmlUn ... -
HttpClient4登陆ITeye
2012-01-08 23:33 1895import java.io.IOException; im ... -
Spring2集成测试
2011-08-25 22:21 761Spring2测试类继承层次 集成测试例子 public ... -
Learning EasyMock3.0 By Official Example
2011-08-24 16:48 1374Maven Installation+ add followi ... -
Maven+jetty+jrebel+m2eclipse+eclipse搭建struts2开发环境
2011-08-11 11:18 4119引用Maven:项目构建工具,通过pom.xml可以自动维护j ...
相关推荐
httpclient4.1.2.zip
httpclient4.1.2 jar包
HttpClient&&HtmlParser(Crawler)网络爬虫 HttpClient&&HtmlParser(Crawler)网络爬虫
HttpClient4.1.2的中英文文档
httpclient jersey所需要的全部jar包,版本是4.1.2,有需要就下载吧
httpClient 4.1.2 API chm格式
Commons HTTPClient4.X组件应用示例
activation.jar、commons-beanutils-1.8.3.jar、httpclient-4.1.2.jar、httpclient-cache-4.1.2.jar、httpcore-4.1.2.jar、httpmime-4.1.2.jar、json-lib-2.4-jdk15.jar、log4j.jar、mail.jar等
HttpClient实现POST GET和文件下载 HttpClient实现POST GET和文件下载
方法和原有低版本的API不太兼容,package路径变为:org.apache.http.相关包,细节使用方式请参考我的博客: ... 如还有更加细致的问题,请在博客中留言,谢谢! 备注:相关的依赖jar包为了避免版本冲突,这里并没有...
用HttpClient实现文件下载需要满足:有一台web服务器,要下载的源文件需存放在web服务器的特定目录下。通过发起http请求实现文件下载功能。
httpclient和RestfuL服务风格上传下载文件,可改为JAVA分布式系统进行交互,具体用法和改法详见代码里的注释
里面包含httpclient4相关的技术文档与实例
httpclient-4.1.2
thrift 生成的java包httpclient-4.1.2.jar
用于访问 http 资源的开发包文档,收集编译并收录。方便开发中查阅~~