Try This Way it worked for me.
while ((dataByte = fis.read())!=-1) {
if (32 <= dataByte && dataByte <= 126 )
{
count++;
sb.append((char) dataByte);
if (0 == (count % 64)) {
sb.append("\n");count=0;
}
}
}
What happening in your code if(number or letter) than append , else if (check count)
While we want if(number or letter) than check is count==64 than append \n
.
You can see the difference.
I hope you got your answer.
Best Of Luck