Class CopyUtils


  • public class CopyUtils
    extends Object
    • Field Detail

      • BUFFER_SIZE

        protected static int BUFFER_SIZE
    • Method Detail

      • copyFile

        public static void copyFile​(File sourceFile,
                                    File destFile,
                                    boolean overwrite,
                                    boolean preserveLastModified)
                             throws IOException
        Copies file from source to destination. The destination directories will be created if it is not in the system
        Parameters:
        sourceFile - The source file object.
        destFile - The destination file object.
        overwrite - The flat to indicate whether to overwrite.
        preserveLastModified - The flat to preserve modified date
        Throws:
        IOException
      • copyFile

        public static void copyFile​(File sourceFile,
                                    File destFile,
                                    Properties tokens,
                                    boolean overwrite,
                                    boolean preserveLastModified)
                             throws IOException
        Copies file from source to destination. The destination directories will be created if it is not in the system
        Parameters:
        sourceFile - The source file object.
        destFile - The destination file object.
        tokens - The map to replace the file contents.
        overwrite - The flat to indicate whether to overwrite.
        preserveLastModified - The flat to preserve modified date
        Throws:
        IOException
      • copyFileFromJar

        public static void copyFileFromJar​(InputStream in,
                                           File destFile,
                                           boolean overwrite)
                                    throws IOException
        Copies file from source to destination. The destination directories will be created if it is not in the system
        Parameters:
        in - The input stream object..
        destFile - The destination file object.
        overwrite - The flat to indicate whether to overwrite.
        Throws:
        IOException