When not using C++0X, stream.clear() should be called to reuse stream.
Merge remote-tracking branch 'remotes/origin/master'
Merge remote-tracking branch 'remotes/upstream/master'
Merge pull request #1155 from igorko/master

When not using C++0X, stream.clear() should be called to reuse stream