Read stream to buffer or string