int result = in.read(data, offset, length);
for (int i = offset; i < offset+result; i++) {
// Do nothing with the printing characters.
if (data[i] == '\n"|| data[i] == '\r" || data[i] == '\t" || data[i] == -1) ;
// nonprinting characters
else if (data[i] < 32 || data[i] > 126) data[i] = (byte) '?";
}
return result;