You are on page 1of 1

try{

FileInputStream fis = new FileInputStream(inFile); //inFile -> Archivo a copiar


FileOutputStream fos = new FileOutputStream(outFile); //outFile -> Copia del arc
hivo
FileChannel inChannel = fis.getChannel();
FileChannel outChannel = fos.getChannel();
inChannel.transferTo(0, inChannel.size(), outChannel);
fis.close();
fos.close();
}catch (IOException ioe) {
System.err.println("Error al Generar Copia");
}

You might also like