Archive

Posts Tagged ‘Java-FileWriter’

How to copy text file in Java?

January 30th, 2009

Code below demonstrating how to copy data from one text file to another in Java.

This testing method, is calling FileCopier.copyFile(File, File) to copy content of file test1.css to file test2.css

    public static void main(String[] args) {
        FileCopier.copyFile(new File("D:/TEMP/test1.css"), 
                            new File("D:/TEMP/test2.css"));
    }

Class: FileCopier.java
Read more...

Programming , ,