摘要: 利用org.apche.tools.zip.ZipOutputStream可以很好的将文件压缩保存,下面的例子是利用递归的方法将文件压缩的例子importjava.io.*;importorg.apache.tools.zip.ZipEntry;importorg.apache.tools.zip.ZipOutputStream;将夜www.jiangyea.com/***提供文件压缩的常用方法*/publicclassZipUtil{/****@paramsrc源文件或者目录*@paramdest压缩文件的目标路径*/publicstaticvoidzip(Stringsrc,Stringd 阅读全文
posted @ 2013-09-13 14:32 将夜 阅读(485) 评论(0) 推荐(0) 编辑
摘要: importjava.util.concurrent.CountDownLatch;importjava.util.concurrent.ExecutorService;importjava.util.concurrent.Executors;将夜www.jiangyea.com/***Helloworld!*/publicclassApp{publicstaticvoidmain(String[]args)throwsInterruptedException{System.out.println("HelloWorld!");ExecutorServiceexecutor 阅读全文
posted @ 2013-09-13 14:31 将夜 阅读(354) 评论(0) 推荐(0) 编辑
摘要: importjava.text.ParseException;importjava.text.SimpleDateFormat;importjava.util.Calendar;importjava.util.Date;将夜www.jiangyea.compublicclassDayCount{//lday为小日期bday为大时间publicstaticintdaysBetween(Stringlday,Stringbday)throwsParseException{SimpleDateFormatsdf=newSimpleDateFormat("yyyy-MM-dd"); 阅读全文
posted @ 2013-09-13 14:30 将夜 阅读(159) 评论(0) 推荐(0) 编辑