comparer le contenu de deux fichiers

comparer le contenu de deux fichiers - Java - Programmation

Marsh Posté le 04-05-2004 à 21:33:18    

vous vous y prendriez comment ?  
 
je pensais utiliser un BufferedReader couplé à un FileReader pour chacun des deux fichiers et comparer ligne à ligne en arrêtant dès que ca ne concorde plus
 
y a moyen de faire plus malin ?  
 
 
PS : j'ai juste besoin de savoir si les deux fichiers sont identiques ou pas ... pas besoin de connaitre les différences.

Reply

Marsh Posté le 04-05-2004 à 21:33:18   

Reply

Marsh Posté le 04-05-2004 à 21:34:17    

Ba y a pas plus malin, non [:spamafote] Tu peux aussi te taper le hash de chaque fichier m'enfin ça revient au même en plus lent :o


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
Reply

Marsh Posté le 04-05-2004 à 22:37:12    

sérieux, c plus lent un hash que d'extraire ligne par ligne et comparer ???


---------------
Jubi Photos : Flickr - 500px
Reply

Marsh Posté le 04-05-2004 à 22:54:43    

Jubijub a écrit :

sérieux, c plus lent un hash que d'extraire ligne par ligne et comparer ???


Ba tu l'fais comment, ton hash ?


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
Reply

Marsh Posté le 04-05-2004 à 22:56:09    

Jubijub a écrit :

sérieux, c plus lent un hash que d'extraire ligne par ligne et comparer ???


 
 :pfff:

Reply

Marsh Posté le 04-05-2004 à 22:56:14    

Quoi ? [:totoz]


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
Reply

Marsh Posté le 04-05-2004 à 22:56:44    


 
je me suis trompé de quote [:joce]

Reply

Marsh Posté le 04-05-2004 à 22:56:57    

Ah ouffe [:ula]


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed