
Java
wp562846864
这个作者很懒,什么都没留下…
展开
-
Java 使用 iReport 导出报表
核心代码如下: private void generateReportByMap(){ // 通过URL获取模板 File reportTemplate = new File("D:/Myeclipse/Learn/Report/test.jasper"); // 设置文件路径与名称 String filePath = reportTemplate.getParent();原创 2014-04-15 21:21:54 · 1131 阅读 · 0 评论 -
使用Java代码压缩文件或文件夹
public static File zip(File srcFile){ File destFile = null; if(srcFile != null){ destFile = new File(srcFile.getParent()+"\\"+srcFile.getName().split("\\.")[0]+".zip"); if(srcFile.isDirector原创 2014-04-17 14:35:57 · 901 阅读 · 0 评论 -
Java 正则表达式里的 groupCount
一开始学习Java正则表达式,总会错误的API当成理所当然的来使用,结果得来的就是花更多的时间工作。今天就遇到了,正则表达式里的Matcher类的groupCount。 首先看看,Java如何创建正则表达式: Pattern p=Pattern.compile("([a-z]+)(\\d+)([a-z]+)(\\d)"); Matcher m=p.matcher("aaa2223bb原创 2014-04-04 09:26:42 · 9145 阅读 · 2 评论 -
Caused by: java.lang.OutOfMemoryError: Java heap space
Caused by: java.lang.OutOfMemoryError: Java heap space 出现这个原创 2014-04-09 12:17:06 · 1081 阅读 · 0 评论 -
java.util.ConcurrentModificationException
Java Map 对象不能在迭代时进行删除操作 示例如下:原创 2014-10-21 14:20:54 · 678 阅读 · 0 评论