collects all data from a readable stream