Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::io::InputStreamReader Class Reference

Readable stream reader. More...

#include <InputStreamReader.h>

Public Member Functions

 InputStreamReader (io::PeekableStream *input) noexcept
 
std::string readLine () noexcept
 

Protected Attributes

PeekableStreaminput
 
text::StringBuilder builder
 

Detailed Description

Readable stream reader.

Constructor & Destructor Documentation

◆ InputStreamReader()

sese::io::InputStreamReader::InputStreamReader ( io::PeekableStream * input)
explicitnoexcept

Member Function Documentation

◆ readLine()

std::string sese::io::InputStreamReader::readLine ( )
noexcept

Read a line

Note
Supports CR, LF, CRLF line separators
Returns
Returns std::string {} if all content is read (e.g., EOF of a file stream)

References sese::text::AbstractStringBuffer::append(), builder, sese::text::AbstractStringBuffer::clear(), sese::text::AbstractStringBuffer::empty(), input, sese::io::PeekableStream::peek(), sese::text::AbstractStringBuffer::toString(), and sese::io::PeekableStream::trunc().

Member Data Documentation

◆ builder

text::StringBuilder sese::io::InputStreamReader::builder
protected

Referenced by readLine().

◆ input

PeekableStream* sese::io::InputStreamReader::input
protected

Referenced by readLine().


The documentation for this class was generated from the following files: