1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
String str = new String();
String strcomp = new String();
boolean found = false;
str = mon_fic.getAbsolutePath();
strcomp = fic1.getAbsolutePath();
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(str));
BufferedOutputStream biscomp = new BufferedOutputStream(new FileOutputStream(strcomp));
int i,j=0;
while ((i = bis.read()) != -1) {
while(found == false)
{
if (tab[j][j] != i)
{
j++;
}
else
{
found = true;
biscomp.write(tab[j][j+1]);
biscomp.flush();
}
}
}
BufferedInputStream biscomp1 = new BufferedInputStream(new FileInputStream(strcomp));
int k = 0;
while ((k = biscomp1.read()) != -1) {
biscomp1.read();
} |
Partager