Java OutputStream Write copyFile(String fileName, String newFileName)

Here you can find the source of copyFile(String fileName, String newFileName)

Description

copy File

License

Apache License

Declaration

public static void copyFile(String fileName, String newFileName) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

import java.io.IOException;

import com.google.common.io.Files;

public class Main {
    public static void copyFile(String fileName, String newFileName) throws IOException {
        Files.copy(new File(fileName), new File(newFileName));
    }//from   w ww .j  a va2s.co m
}

Related

  1. copyFile(final InputStream in, final OutputStream out, final int size)
  2. copyFile(InputStream in, OutputStream out)
  3. copyFile(InputStream in, OutputStream out, boolean close)
  4. copyFile(InputStream inputStream, OutputStream outputStream)
  5. copyFile(OutputStream os, InputStream is)
  6. copyFilePermissions(File source, File target)
  7. serialize(java.io.Serializable serializable, java.io.ObjectOutputStream oos)
  8. serialize(Object o, OutputStream out)
  9. serialize(Object obj, OutputStream out)