package iotest3;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author Ralf Kunze (rkunze@uos.de), Institut fuer Informatik, Universitaet
 *         Osnabrueck
 * @date 22.04.2007
 */
public class CopyFast {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			FileInputStream src = new FileInputStream("iotest3/SRC");
			FileOutputStream dst = new FileOutputStream("iotest3/DST");

			byte[] token = new byte[1024];
			int length =0;
			
			while ((length=src.read(token))!=-1) {
				dst.write(token, 0, length);
			}
			src.close();
			dst.close();
		} catch (IOException e) {
			System.err.println("Fehler beim Kopieren");
			e.printStackTrace();
		} 
	}

}
