Hello, all!
I have a (hopefully) quick question:
I have an array of 128 ASCII characters called blockData[] that I am trying to convert into a string.
for (int i = 0; i < 128; i++){
blockStuff = inFile.read();
blockData[i] = blockStuff;
if (blockData[i] != 0){
String aChar = Character.toString ((char)blockData[i]);
word += aChar;
}
}
System.out.println("Word is " + word);
My current output is:
Word is null...
lost+foundnagios-3.2.0.tar.gz88nagios-3.2.0$Pi - Dec - Chudnovsky.txt
Now my question is...what is causing those squares in the output? It appears that they are at the indexes where blockData[] == 0.
Any ideas on how I can eliminate them?
Thank you for any input
- Jim