java io
a514548454
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
http发送服务请求实例
HttpPost req = new HttpPost("/dm"); req.addHeader("Content-Type", "application/json; charset=UTF-8"); String jsonReq = MsgWrap.wrapRequestMsg("getdevices", "0",new JSONObject()); req.setEntity(n原创 2014-05-15 15:40:52 · 950 阅读 · 0 评论 -
读取properties配置文件方法
public static void getIP(){ FileInputStream s = null; try { System.out.println(path); s = new FileInputStream(new File(path)); properties.load(s); IP = properties.getProperty("avenuebus.IP原创 2014-05-15 15:48:15 · 412 阅读 · 0 评论 -
将文件夹下面的文件打包成zip
package cn.gov.csrc.base.util; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException;转载 2014-08-26 18:32:49 · 603 阅读 · 0 评论 -
递归遍历文件夹
public static void FileList(String reportPath,ConcurrentLinkedQueue filelist ) { File [] files = new File(reportPath).listFiles(); if(files != null && files.length>0){ for (int i = 0; i原创 2014-08-27 11:42:38 · 542 阅读 · 0 评论 -
获取XML节点完整方法
/** * 根据Xpath表达式获取节点 * @param node * @param xpath * @return */ public static String getTextByNodeXpath(Node node,String xpath){ Node singNode = node.selectSingleNode(xpath); if原创 2014-09-02 17:02:41 · 969 阅读 · 0 评论 -
压缩文件夹下面的所有文件和文件夹
package com.huawei.cddevops; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import org.apache.tools.zip.ZipOutputStream; public class CompressBook { pu转载 2014-09-04 20:40:35 · 528 阅读 · 0 评论 -
简单读取输入输出流DEMO
char c[]=new char[100]; public void change(){ for(int i=0;i if(c[i]=='a'){ c[i]='A'; } } } public void connection(){ try{ File f=new File("D:\\text1.txt"); File原创 2014-03-28 15:51:45 · 573 阅读 · 0 评论
分享