•int
ch; // character read as an int (line 28)
•while
((ch = inStream.read()) != -1) { // 36
• outStream.write(ch);
•}
•Java (and C) idiom: assignment statement x = y gets value of x , so
• (ch = inStream.read()) != EOF
–sends instream a read()
message
–assigns returned int to variable
ch
–compares that int to EOF,
declared final static, used by read() to signal end of
file
–result is true or false, so
useful inside while( )