package org.math.io.files;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
/**
* BSD License
*
* @author Yann RICHET
*/
public abstract class DataFile {
protected File file;
public DataFile(File f) {
file = f;
}
public static void copyFile(File in, File out) throws IOException {
FileInputStream fis = new FileInputStream(in);
FileOutputStream fos = new FileOutputStream(out);
byte[] buf = new byte[1024];
int i = 0;
while ((i = fis.read(buf)) != -1) {
fos.write(buf, 0, i);
}
fis.close();
fos.close();
}
}