Ajouter un commentaire

wiss20000

j'ai réussi à supprimer les 3 premiers mais les 2 derniers pas encore
et voici comment j'ai supprimer les 3 premiers

 for (int i=0;i<3;i++) {
		try {
 
			File file = new File("EXCHO00.csv");
			RandomAccessFile tools = new RandomAccessFile(file, "rw"); // read-write
			tools.readLine(); // goto second line
			long length = tools.length() - tools.getFilePointer(); // except first line
			byte[] nexts = new byte[(int) length];
			tools.readFully(nexts); // read the others
			tools.seek(0); // return to start
			tools.write(nexts); // insert just 1 line before
			tools.setLength(nexts.length); // truncate the last duplicated line
			tools.close(); // flush all
 
		} catch (Exception error) {
			error.printStackTrace();
		}
 
	}

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 TTTTTT   SSS   III  EEEE  BBBB  
TT S I E B B
TT SSS I EEE BBBB
TT S I E B B
TT SSSS III EEEE BBBB