Fixed incorrect stream size

- Fixed stream closing before passing all data
- Stream read() now responds 0 when no data available as per
NSInputStream documentation
- Incremented stream length variabile to uint32