资源简介
一种小型的翻译集合工具,支持的翻译来源谷歌、百度、腾讯、金山、有道、欧米翻译
代码片段和文件信息
package com.lsj.http;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public abstract class AbstractHttpParams implements HttpParams{
protected final Map params = new HashMap<>();
@Override
public HttpParams put(String key String value){
params.put(key value);
return this;
}
@Override
public String send2String(String baseUrl) throws Exception {
CloseableHttpClient httpClient = HttpClients.createDefault();
try{
CloseableHttpResponse response = send(httpClient baseUrl);
return EntityUtils.toString(response.getEntity());
}finally{
httpClient.close();
}
}
@Override
public InputStream send2InputStream(String baseUrl) throws Exception {
CloseableHttpClient httpClient = HttpClients.createDefault();
try{
CloseableHttpResponse response = send(httpClient baseUrl);
return response.getEntity().getContent();
}finally{
httpClient.close();
}
}
abstract protected CloseableHttpResponse send(CloseableHttpClient httpClient String baseUrl) throws Exception ;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 1388 2017-03-31 15:44 translate-set-master\.classpath
....... 371 2017-03-31 15:44 translate-set-master\.project
....... 70 2017-03-31 15:44 translate-set-master\.settings\org.eclipse.core.resources.prefs
....... 587 2017-03-31 15:44 translate-set-master\.settings\org.eclipse.jdt.core.prefs
....... 13 2017-03-31 15:44 translate-set-master\bin\.gitignore
....... 2212 2017-03-31 15:44 translate-set-master\bin\com\lsj\http\AbstractHttpParams.class
....... 1776 2017-03-31 15:44 translate-set-master\bin\com\lsj\http\HttpGetParams.class
....... 3026 2017-03-31 15:44 translate-set-master\bin\com\lsj\http\HttpMimeParams.class
....... 386 2017-03-31 15:44 translate-set-master\bin\com\lsj\http\HttpParams.class
....... 2719 2017-03-31 15:44 translate-set-master\bin\com\lsj\http\HttpPostParams.class
....... 1168 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\AbstractOnlineTranslator.class
....... 450 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\annotation\TranslatorComponent.class
....... 489 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\exception\DupIdException.class
....... 4908 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\factory\AbstractTranslatorFactory.class
....... 182 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\factory\TFactory.class
....... 882 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\factory\TranslatorFactory.class
....... 2538 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\impl\BaiduTranslator.class
....... 4485 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\impl\GoogleTranslator.class
....... 1872 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\impl\JinshanTranslator.class
....... 2312 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\impl\TencentTranslator.class
....... 2988 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\impl\YoudaoTranslator.class
....... 991 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\LANG.class
....... 260 2017-03-31 15:44 translate-set-master\bin\com\lsj\Trans\Translator.class
....... 2490 2017-03-31 15:44 translate-set-master\bin\test\TransTest.class
....... 231320 2017-03-31 15:44 translate-set-master\jar\commons-beanutils-1.8.0.jar
....... 263965 2017-03-31 15:44 translate-set-master\jar\commons-codec-1.9.jar
....... 575389 2017-03-31 15:44 translate-set-master\jar\commons-collections-3.2.1.jar
....... 279193 2017-03-31 15:44 translate-set-master\jar\commons-lang-2.5.jar
....... 60841 2017-03-31 15:44 translate-set-master\jar\commons-logging-1.1.1.jar
....... 61829 2017-03-31 15:44 translate-set-master\jar\commons-logging-1.2.jar
............此处省略76个文件信息
- 上一篇:基于安卓的京东网上商城源码
- 下一篇:PSOC 官方例程 赛普拉斯 RTC 实时时钟
相关资源
- LTE 36.200-36.214物理层、MAC、RLC、PDCP、
- OpenFoam程序员手册2.3版中文翻译大全
- cvpr论文翻译一篇
- Spring相关的外文文献和翻译(毕设论
- UWB定位DW1000硬件数据手册中文翻译文
- 计算机毕业设计的外文翻译附外文原
- 南极星汉化软件
- 基于WebCam的人脸检测技术的设计与实
- 物联网概论四篇高级别论文全英版+翻
- 数学方面的中英文文献翻译
- 深层卷积神经网络实现超分辨重建,
- 本科毕业设计——电子词典系统的设
- 计算机毕业设计外文翻译
- 89c51单片机论文英文文献翻译
- 自适应信号处理-维德罗的著作翻译本
- ISA95翻译,MES开发相关学习资料
- 编译原理——for循环语句的翻译,L
- 89c51单片机 英语文献翻译.doc
- 机器翻译原理与方法讲义
- 2019MCM-ICM原题及翻译
- 编译原理 for 条件语句,while 语句的翻
- BhumanCodeRelease翻译(1-4章)
- 科研必备|SCI全文翻译软件:优于谷歌
- OPNET 用户指南 中文版
- 深度学习-LeCun、Bengio和Hinton的联合综
- 多线程编程指南[中文完整翻译版] –
- 物流管理信息系统外文以及翻译
- 计算机相关专业毕业设计外文翻译
- 张威的人脸识别毕业论文,包括开题
- 。关于供应链的外文翻译
评论
共有 条评论