Copiar aquivos em java

como q faco pra copiar aquivos .mbd d um diretorio pra outro usando Java ?
Alquem ja fez isso alguma vez ?

Só tranferir arquivo? É fácil…

FileInputStream fis = new FileInputStream("arqOrigem");
FileOutputStream for = new FileOutputStream("arqDestino");
FileChannel fcOrg = fis.getChannel();
FileChannel fcDest = fos.getChannel();
fc.transferTo(fcDest);

Teste aí o programa e veja se funciona

[quote=“microfilo”]Só tranferir arquivo? É fácil…

FileInputStream fis = new FileInputStream("arqOrigem");
FileOutputStream for = new FileOutputStream("arqDestino");
FileChannel fcOrg = fis.getChannel();
FileChannel fcDest = fos.getChannel();
fc.transferTo(fcDest);

Teste aí o programa e veja se funciona[/quote]

nao funcionou!
fcOrg.transferTo(fcDest);

deu pau aqui!

E ae cassolato! Blz?

Cara tem um exemplo neste topico

http://www.portaljava.com.br/home/modules.php?name=Forums&file=viewtopic&t=12361&highlight=&sid=0bc365484822043c89de93faece0ddf5

ps.: Conseguiu arrumar aquele erro do jasper?

Falow!!! :grin: