Java File Copy Library v0.9.7发布

Java ">File Copy Library 提供了一种简易的方法用于执行大量的文件拷贝工作,可定义批处理进行文件复制,复制的过程可通过一个进度条显示。

The Java File Copy Library is a software library that provides an easy and powerful API for file copy operations. You can define a batch of copy jobs with regular expressions and can use a Swing Component to show the overall copy progress.

Before starting the copy operation you define the sources with a base directory and a search pattern defined by regular expressions. Then you define the copy destinations (yes, you can copy your files to several destinations at once). With the given sources and destinations you can define a copy job:

Source[] sources = new Source[]{
        // all files from directory /home/user/source1/
        new Source("/home/user/source1/", ".*"),
        // all *.java files from directory /home/user/source2/
        new Source("/home/user/source2/", ".*\\.java")
    };
    String[] destinations = new String[]{
        "/home/user/destination1",
        "/home/user/destination2"
    };
    CopyJob copyJob = new CopyJob(sources, destinations);
       
If you are done with defining your copy jobs you can let them execute by a FileCopier instance all at once.

fileCopier.copy(copyJob1, copyJob2);
       
This function uses Varargs for the parameters. This way you can throw as many copy jobs at a FileCopier at once as you want.
If you want to see the progress of your copy operation in a GUI application, you can add a FileCopierPanel to your GUI application and give it a reference to your current FileCopier:

FileCopier fileCopier = new FileCopier();
    fileCopierPanel.setFileCopier(fileCopier);
       
In GUI applications you should use a SwingWorker to execute the fileCopier.copy() operation.
The Java File Copy Library Swing Component shows the following information per default:

·the already copied amount of data
·the data volume of all specified copy jobs
·the speed of the copy operation
·the progress of the copy operation (both graphical and numerical)
·the elapsed time
·the estimated total time
·the estimated remaining time
·the estimated completion time

For Downloads, Bug Tracking, etc. please see the SourceForge Project for Java File Copy Library

时间: 2024-08-04 12:59:29

Java File Copy Library v0.9.7发布的相关文章

JavaScript 工具库 Cloudgamer JavaScript Library v0.1 发布_js面向对象

主要集合了我写js时一些常用的方法,并参考了prototype.js,jquery,google,百度,有啊等框架. 工具库已经在近几个效果中使用:JavaScript 多级联动浮动菜单 (第二版) JavaScript 浮动定位提示效果 JavaScript Table行定位效果 JavaScript Table排序 这个工具库的主要特点是: [跨浏览器]能在以下浏览器使用:IE6,IE7,IE8,Firefox 3.5.3,Chrome 3.0,Safari 4.0.3,Opera 10.1

JavaScript 工具库:Cloudgamer JavaScript Library v0.1 发布

研究了一年多的js,也差不多写一个自己的js库了. 我写这个不算框架,只是一个小型的js工具库,所以我用的名字是Library. 主要集合了我写js时一些常用的方法,并参考了prototype.js,jquery,google,百度,有啊等框架. 这个工具库的主要特点是: [跨浏览器]能在以下浏览器使用:IE6,IE7,IE8,Firefox 3.5.3,Chrome 3.0,Safari 4.0.3,Opera 10.10 ie系列是必须的,其他能支持最新版本就够了. [使用命名空间] 当然不

libcloud v0.4.2发布 统一云计算接口

libcloud v0.4.2发布 统一云计算接口,前该项目还是 http://www.aliyun.com/zixun/aggregation/14417.html">Apache 上的孵化项目. libcloud is a client library for interacting with many of the popular cloud server providers. It was created to make it easy for developers to buil

java 各种copy

Java里面有许多需要copy的地方,比如copy文件,copy数组,现总结如下 (1)copy文件 Java代码   public static void copyFile(String resourceFileName, String targetFileName)               throws IOException {           File resourceFile = new File(resourceFileName);           File target

RetroShare v0.5.1a发布 跨平台的P2P分享程序

RetroShare是一个http://www.aliyun.com/zixun/aggregation/34880.html">即时通讯工具(聊天/IM),它是跨平台的P2P分享程序,它基于网络对等层和用OenSSL对信息进行加密,目标是要做一个安全的IM以及文件共享的P2P服务,提供了文件分享,聊天,信息和频道等功能. 它的目标是要做一个安全的IM以及文件共享的P2P服务.但对于这个领域来说,它不太靠谱,并且它并没能支持三大IM服务. 更新日志: Changes for v0.5.1a

RKWard v0.5.5发布 一款R语言的图形化开发工具

RKWard v0.5.5发布一款R语言的图形化开发工具.R是用于统计分析.绘图的语言和操作环境.R是属于GNU系统的一个自由.免费.源代码开放的软件,它是一个用于统计计算和统计制图的优秀工具. 更新说明: New features and improvements - Re-organize the default toolbar actions of the main window - Detached windows are now restored in detached state w

微信开发,将微信官网源码(java版)导入,用tomcat发布时报错,求解答?

问题描述 微信开发,将微信官网源码(java版)导入,用tomcat发布时报错,求解答? 2016-3-17 14:19:13 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.li

Java File类的常用方法总结

 这篇文章主要介绍了Java File类的常用方法总结,本文讲解了File类的常用方法,并对一些方法给出了代码示例,需要的朋友可以参考下     Java File类的功能非常强大,利用Java基本上可以对文件进行所有的操作.本文将对Java File文件操作类进行详细地分析,并将File类中的常用方法进行简单介绍,有需要的Java开发者可以看一下. 构造函数 代码如下: public class FileDemo { public static void main(String[] args)

java File类的基本使用方法总结_java

Java IO中File的使用是比较频繁的,在文件的上传和删除中都会用到的.比如我们在写管理系统的时候有可能会用到图片的上传,和删除.那么我们就会用到Java的 File来处理. Java中File的基本使用创建和删除文件: public class FileDemo { public static void main(String[] args) { File f=new File("d:"+File.separator+"io.txt"); //File.sep