support stream as well
Merge pull request #1 from twada/stream

Stream support