1 package test; 2 3 import java.io.*; 4 import java.util.*; 5 6 public class Test20 7 { 8 public static void main(String[] args) throws Excepti...
分类:
编程语言 时间:
2014-10-25 20:07:48
阅读次数:
250
作者:张昌昌
为了获取一个压缩包中的文件,而该压缩包里可能又含有压缩包 、文件夹、文件夹里又包含压缩包、文件等各种嵌套的情况,采用广度优先遍历和深度优先遍历的方法解决了此问题。
public static List getFilesOfZipAndRar(String zipPath) throws IOException
{
String dest...
分类:
编程语言 时间:
2014-10-25 18:48:36
阅读次数:
438
有时我们在做项目归档的时候难免会遇到,进行统计代码的行数,这时我们可以用一段代码,直接统计出来。
下面我给出一段统计一个java工程下代码的行数的实例代码:import java.io.File;
import jodd.io.FileUtil;
public class Test {
public static void main(String[] args) throws Excepti...
分类:
其他好文 时间:
2014-10-24 11:04:36
阅读次数:
218
原理: 通过调用windows下的dos命令实现拨号public class ConnectNetWork { public static String executeCmd(String str) throws Exception { Process p = Runtime.getRunti...
分类:
编程语言 时间:
2014-10-24 01:43:54
阅读次数:
255
/** * 图片设置圆角 * @param srcImage * @param radius * @param border * @param padding * @return * @throws IOException */ ...
分类:
编程语言 时间:
2014-10-24 01:41:25
阅读次数:
273
public
void saveSDCard(String filename,
String filecontent)throws Exception
{
File file =
new File(Environment.getExternalStorageDirectory(),filename);
FileOutputStream outStream =
new FileOu...
分类:
其他好文 时间:
2014-10-23 17:43:54
阅读次数:
148
1 public void doPost(HttpServletRequest request, HttpServletResponse response) 2 throws ServletException, IOException { 3 4 //...
分类:
编程语言 时间:
2014-10-23 15:50:10
阅读次数:
150
一,导出excel1,使用excel模板public void exportLog() throws Exception{ SystemUser currentUsr = getCurrentSystemUser(); //该用户的所有日志 ...
分类:
编程语言 时间:
2014-10-23 15:49:49
阅读次数:
220
调度室-TestInvocation
/**
* {@inheritDoc}
*/
@Override
public void invoke(ITestDevice device, IConfiguration config, IRescheduler rescheduler) throws DeviceNotAvailableException, Throwable {
try...
分类:
其他好文 时间:
2014-10-21 21:41:35
阅读次数:
273
用反射的形式来执行以下代码new String(new StringBuffer("abc"));public static void main(String[] args) throws Exception { // TODO Auto-generated method stub // 运用反射的...
分类:
编程语言 时间:
2014-10-20 13:05:04
阅读次数:
160