Update StreamResourceUtility.cs

add checking of Read() return value. without this using of non-initialized (0) value or value from the previous step of loop.
Merge pull request #1 from valker/patch-1

Update StreamResourceUtility.cs