fix bug in code sample for Stream.resource
Merge pull request #1956 from diogovk/master

fix bug in code sample for Stream.resource