added methods to read all content from stream and read content by line with delimiter