get file content
来源:互联网 发布:mac book pro 15寸 编辑:程序博客网 时间:2024/05/01 15:46
private String getFileContent(String url) {
byte[] responseBody = null;
try {
HttpClient client = new HttpClient();
if (PropertyReader.getInstance().getPxy_usage().trim().equals(
"true")) {
HostConfiguration hConf = client.getHostConfiguration();
String proxyServer = PropertyReader.getInstance()
.getServerName().trim();
String proxyPort = PropertyReader.getInstance().getPort();
int port = new Integer(proxyPort).intValue();
hConf.setProxy(proxyServer, port);
}
HttpMethod method = new GetMethod(url);
int statusCode = client.executeMethod(method);
if (statusCode != HttpStatus.SC_OK) {
}
responseBody = method.getResponseBody();
method.releaseConnection();
return new String(responseBody, "shift_jis");
} catch (IOException ioe) {
}
// content code end
}
- get file content
- command to get the man page content to file
- trim content between begin and end lines or get from keyword line to file end
- Get-Content 帮助信息
- Android Get Share Content
- file content-type
- get web url content length
- Get Html Content use HttpDownloader
- [WPF] RichTextBox get/clear content
- Update file Master File content---H00030C
- get web.config file
- get file name
- java get file contents
- get file size
- Get File Encode
- get limit one record through content provider
- Powershell: Get Content Faster with ReadCount!
- How to get AutoCAD Mtext content
- Lisp的本质(The Nature of Lisp)
- GPL与LGPL
- #define 用法
- 给定两个数组,交换它们的元素,使得两数组元素之和的差绝对值最小
- hibernate id Generator
- get file content
- CentOS 5 较快yum配置(国内)
- Oracle 学习总结
- csdn
- WF从入门到精通(第十章):事件活动
- 准备Scrum之旅 之 回家的故事 ——《轻松Scrum之旅》(11)
- ScriptManager和UpdatePanel控件(转)
- Ubuntu基本命令大全
- 让LoadRunner走下神坛(分析lr的,感觉挺好)