Fixing ElementInputStream read(byte[], int, int) to return -1 when done.
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.
Reworking test to remove Executor and fail on zero value from read()
Merge pull request #32 from mfurtak/elementinputstream-read-fix

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