The "if" condition at line 22 is ignored.
It is suppose to append the read(from the stream) character to codeToken three times(the "if" condition at line 22 make sure that happen), but instead, its ignored all the time.
The output is like this:
It is suppose to look like this(but it doesnt, that's the problem):Quote:
------------
h
------------
h
------------
e
------------
C
------------
Quote:
------------
------------
------------
hhe
------------
------------
------------
Cd4
Code:public void decryptFile() throws Exception
{
assetsLoaded ();
controlKey ();
FileReader fr = new FileReader (this.filePath);
BufferedReader in = new BufferedReader (fr);
FileOutputStream fo = new FileOutputStream (this.outputPath);
BufferedOutputStream out = new BufferedOutputStream (fo);
int binary;
int counter = 0;
String codeToken = "";
while ((binary = in.read ()) != -1)
{
codeToken = codeToken + ((char) binary);
System.out.println ("------------");//DEBUG
if (counter++ > CODESPERCHAR)
continue;
System.out.println (codeToken);//DEBUG
//out.write ((int)decrypt (codeToken));
codeToken = "";
counter = 0;
}
in.close ();
out.close ();
}

