Read stream from buffer