Demo file copy using Guava

/* Demo file copy using Guava
 * src:file to be copied
 * dst:copied/new file created from copy.
   public void dtmCopyFile(final String src, final String dst)
      checkNotNull(src, "Source file cannot be null.");

      checkNotNull(dst, "Destination file cannot be null.");

      final File srcFile = new File(src);
      final File dstFile = new File(dst);

         Files.copy(srcFile, dstFile);
      catch (IOException fileIoEx)
         err.println("Error copying file.");
err.println("Error Message: " + fileIoEx.toString() );


Popular posts from this blog

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS