quick reference
文章平均质量分 53
CounterZZD
这个作者很懒,什么都没留下…
展开
-
java读写文件
quick reference read public static List getAllTxtFiles(String dirLocation){ File f = new File(dirLocation); if(!f.isDirectory() && f.getName().endsWith(".txt")){ fileList.add(f.getAbsoluteP原创 2013-03-03 16:12:15 · 450 阅读 · 0 评论 -
用DOM4J解析XML
好久没用dom4j这样的老东西了,每次都是忘记,这次记下 尤其要注意 Document的setXMLEncoding很重要. String xml = sb.toString(); Document d = DocumentHelper.parseText(xml); d.setXMLEncoding("UTF-8"); Element root = d.getRootE原创 2013-02-27 17:35:41 · 379 阅读 · 0 评论 -
用HttpClient发送post请求
好久没更博客,最近又开始工作了,附上一些quick reference以供后用 注意编码问题!! package com.cldknw.test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; i原创 2013-02-27 12:35:55 · 633 阅读 · 0 评论 -
tomcat日志设定
1 Tomcat 日志概述 Tomcat 日志信息分 为 两 类 : 一是运行中的日志,它主要 记录 运行的一些信息,尤其是一些异常 错误 日志信息 。 二是 访问 日志信息,它 记录 的 访问 的 时间 , IP , 访问 的 资 料等相 关 信息。 2 Tomcat 日志配置 2.1 访问日志的配置 默认 tomcat 不记录访问日志,如下方法可以使转载 2013-03-06 11:42:36 · 741 阅读 · 0 评论 -
Gson
Person person = gson.fromJson(str, Person.class); List ps = gson.fromJson(str, new TypeToken>(){}.getType()); Gson gson = new GsonBuilder() .excludeFieldsWithoutExposeAnnotation() //不导出原创 2013-03-06 16:48:28 · 768 阅读 · 0 评论 -
java遍历hashmap
转]Java中HashMap遍历的两种方式 原文地址: http://www.javaweb.cc/language/java/032291.shtml 第一种: Map map = new HashMap(); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry转载 2013-03-06 10:59:58 · 764 阅读 · 0 评论 -
apache cxf restful的文件上传
@POST @Produces("application/json") @Path("/upload/{isSafe}") public String uploadFile(@PathParam("isSafe") String safe,MultipartBody body) { try { long t = new Date().getTime(); for (Attac原创 2013-04-10 12:23:16 · 4649 阅读 · 13 评论 -
最近收藏的技术博客
网易 何登成 http://hedengcheng.com/ 阿里 童佳旺 http://www.dbthink.com/ 阿里 沈询 http://qing.blog.sina.com.cn/whisperxd http://blog.sina.com.cn/u/1765738567 冯大辉 丁香园CTO http://dbanotes.net/原创 2014-03-18 14:28:55 · 766 阅读 · 0 评论 -
linux大文件查找
df -l 查看磁盘占用 du -hm --max-depth=1 | sort -nr | head -12 当前目录 按大小排序原创 2016-04-26 16:58:55 · 728 阅读 · 1 评论