public static void copy(File src, File dest) {
        if (dest.exists() && !dest.canWrite()) {
            return;
        }
        BufferedInputStream in = null;
        BufferedOutputStream out = null;
        try {
            in = new BufferedInputStream(LdiFileInputStreamUtil.create(src));
            out = new BufferedOutputStream(LdiFileOutputStreamUtil.create(dest));
            byte[] buf = new byte[1024];
            int length;
            while (-1 < (length = in.read(buf))) {
                out.write(buf, 0, length);
                out.flush();
            }
        } catch (IOException e) {
            throw new IORuntimeException(e);
        } finally {
            LdiInputStreamUtil.close(in);
            LdiOutputStreamUtil.close(out);
        }
    }
public static void copy ( File src , File dest ) { if ( dest . exists ( ) && ! dest . canWrite ( ) ) { return ; } BufferedInputStream in = null ; BufferedOutputStream out = null ; try { in = new BufferedInputStream ( LdiFileInputStreamUtil . create ( src ) ) ; out = new BufferedOutputStream ( LdiFileOutputStreamUtil . create ( dest ) ) ; byte [ ] buf = new byte [ 1024 ] ; int length ; while ( - 1 < ( length = in . read ( buf ) ) ) { out . write ( buf , 0 , length ) ; out . flush ( ) ; } } catch ( IOException e ) { throw new IORuntimeException ( e ) ; } finally { LdiInputStreamUtil . close ( in ) ; LdiOutputStreamUtil . close ( out ) ; } }
@param src
@param dest