That's on purpose. The int is -1 if you are at end-of-file. Otherwise, it can be cast to a char:
int input = in.read();
if (input == -1) {
//react to end-of-file
} else {
char ch = (char) input;
...
}