<<Fichie java>>

Bonjour
je veux copie des donnée de test.txt a test2.txt en utilisant java.nio ?
j'ai lu le fichier test.txt :
  FileInputStream fis;
  FileChannel fc;
fis =new FileInputStream(new File("test.txt"));
fc=fis.getChannel();
int size=(int)fc.size();
ByteBuffer bBuf=ByteBuffer.allocate(size);
long time=System.currentTimeMillis();
fc.read(bBuf);

mais je ne sais pas comment ecrire en test2

1 réponse