So you can signal EOF:
“Notice that read() returns an int value. If the input is a stream of bytes, why doesn’t read() return a byte value? Using a int as a return type allows read() to use -1 to indicate that it has reached the end of the stream.”
http://java.sun.com/docs/books/tutorial/essential/io/bytestreams.html