Implements a xtd::io::text_reader that reads characters from a byte stream.
- Namespace
- xtd::io
- Library
- xtd.core
|
| stream_reader (const xtd::ustring &path) |
| Initializes a new instance of the stream_reader class for the specified file name.
|
|
| stream_reader (std::istream &stream) |
| Initializes a new instance of the stream_reader class for the specified stream.
|
|
std::optional< std::reference_wrapper< std::istream > > | base_stream () const |
| Returns the underlying stream.
|
|
void | close () override |
| Closes the stream_reader object and the underlying stream, and releases any system resources associated with the reader.
|
|
bool | end_of_stream () const |
| Gets a value that indicates whether the current stream position is at the end of the stream.
|
|
int32_t | peek () const override |
| Reads the next character without changing the state of the reader or the character source. Returns the next available character without actually reading it from the input stream.
|
|
int32_t | read () override |
| 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 int32_t | peek () const |
| Reads the next character without changing the state of the reader or the character source. Returns the next available character without actually reading it from the input stream.
|
|
virtual int32_t | read () |
| Reads the next character from the input stream and advances the character position by one character.
|
|
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 buffer, beginning at the specified index.
|
|
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 buffer, beginning at the specified index.
|
|
virtual xtd::ustring | read_line () |
| Reads a line of characters from the current stream and returns the data as a string.
|
|
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 string.
|
|
| object ()=default |
| Create a new instance of the ultimate base class object.
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object.
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type.
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const |
| Gets the type of the current instance.
|
|
virtual xtd::ustring | to_string () const noexcept |
| Returns a std::string that represents the current object.
|
|