The byte code ranges from 0 to 256 (and -1 which indicates the EOF), but the java byte variable ranges from -128 to 128. How is that method able to store the bytes from the