J2EE
文章平均质量分 79
gaozzsoft
这个作者很懒,什么都没留下…
展开
-
java.io.IOException: Too many open files解决方案
异常:java.io.IOException: Too many open files: 解决方案: ulimit -n Linux: vi /etc/security/limits.conf # End of file * soft nofile 65535 * hard nofile 65535 命令:ulimit -n 原因: ...原创 2013-03-06 15:35:34 · 648 阅读 · 0 评论 -
java内存泄露和内存溢出区别
虽然jvm可以通过GC自动回收无用的内存,但是代码不好的话仍然存在内存溢出的风险。 最近在网上搜集了一些资料,现整理如下: —————————————————————————————————————————— 一、为什么要了解内存泄露和内存溢出? 1、内存泄露一般是代码设计存在缺陷导致的,通过了解内存泄露的场景,可以避免不必要的内存溢出和提高自己的代码编写水平; ...原创 2016-07-01 18:30:46 · 92 阅读 · 0 评论 -
HttpClient 4.5.2版本设置连接超时时间-CloseableHttpClient设置Timeout
HttpClient 4.5版本设置连接超时时间-CloseableHttpClient设置Timeout(区别于4.3.2) HttpClient升级到4.5版本后,API有很多变化,HttpClient 4之后,API一直没有太稳定,我感觉4.5版本抽象后,很多API应该快稳定了。 使用HttpClient,一般都需要设置连接超时时间和获取数据超时时间。这两个参数...原创 2017-01-10 14:48:43 · 4066 阅读 · 0 评论 -
Java处理Http请求的几种方式总结
1.commons-httpclient 简洁快速模拟HTTP请求 <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.1<...原创 2017-01-10 18:17:38 · 474 阅读 · 0 评论 -
itext实现PDF生成的两种方式-从HTML到PDF
itext实现PDF生成的两种方式-从HTML到PDF maven依赖pom配置: <dependency> <groupId>com.itextpdf</groupId> <artifactId>itext-asian</artifactId> <version>5.2.0</versi...原创 2017-01-18 14:38:11 · 738 阅读 · 0 评论 -
JAVA多线程使用研究
Part One: 一个线程处理 if (CollectionUtils.isNotEmpty(cqcAttachmentDataList)) { long startTimes = System.currentTimeMillis(); final CountDownLatch latchOnlyOne = new CountDownLatch(1); new Thread(new ...原创 2017-12-06 18:58:07 · 155 阅读 · 0 评论