Changing ElementInputStream read(byte[], int, int) to return -1 when no more data is available

The current implementation of `ElementInputStream#read(byte[], int, int)` will return 0 when asked to read when no more bytes are remaining. However, the `InputStream` contract for that method specifies that it should return, "-1 if there is no more data because the end of the stream has been reached."  This difference causes typical idioms for stream copying, which check for a -1 return value, to enter an infinite loop.