I need to be able to find a certain value (such as 80
) in a file like:
4D 54 68 64 00 00 00 06 00 01 00 01 00 C0 4D 54 72 6B 00 00 00 31 00 90 60 40 81 40 80 60 40 00 90 62 40 81 40 80 62 40 00 90 64 40 81 40 80 64 40 00 90 62 40 81 40 80 62 40 00 90 57 40 81 40 80 57 40 00 FF 2F 00
example of my code :
RandomAccessFile file = new RandomAccessFile(new File(fichierAConvertir), "rw");
System.out.println(fichierAConvertir);
if(file.read() == 0x80)
{
System.out.println("trouvé");
}
else{
System.out.println("pas trouvé");
}
I also want to be able to replace all cases of that value by an another value .
I'm French, so sorry for my English skills..