10 #include "../core_export.h"
11 #include "../object.h"
12 #include "../ustring.h"
19 class null_text_reader;
20 class synchronized_text_reader;
43 virtual int32_t
peek()
const;
54 virtual size_t read(std::vector<char>& buffer,
size_t index,
size_t count);
61 virtual size_t read_block(std::vector<char>& buffer,
size_t index,
size_t count);
Represents a null text reader.
Definition: text_reader.h:86
int32_t read() override
Reads the next character from the input stream and advances the character position by one character.
Represents a synchronized text reader.
Definition: text_reader.h:95
int32_t read() override
Reads the next character from the input stream and advances the character position by one character.
Represents a reader that can read a sequential series of characters.
Definition: text_reader.h:29
virtual xtd::ustring read_line()
Reads a line of characters from the current stream and returns the data as a string.
virtual size_t read(std::vector< char > &buffer, size_t index, size_t count)
Reads a specified maximum number of characters from the current text reader and writes the data to a ...
virtual int32_t read()
Reads the next character from the input stream and advances the character position by one character.
virtual void close()
Closes the xtd::io::text_reader and releases any system resources associated with the text_reader.
virtual size_t read_block(std::vector< char > &buffer, size_t index, size_t count)
Reads a specified maximum number of characters from the current text reader and writes the data to a ...
virtual xtd::ustring read_to_end()
Reads all characters from the current position to the end of the text_reader and returns them as one ...
virtual int32_t peek() const
Reads the next character without changing the state of the reader or the character source....
text_reader()=default
Initializes a new instance of the xtd::io::text_reader class.
static synchronized_text_reader synchronised(text_reader &reader) noexcept
Creates a thread-safe (synchronized) wrapper around the specified text_reader object.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
#define core_export_
Define shared library export.
Definition: core_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17