Creates a stream whose backing store is memory.
Creates a stream whose backing store is memory.
Definition memory_stream.hpp:28
Provides a generic view of a sequence of bytes. This is an abstract class.
Definition stream.hpp:40
#define core_export_
Define shared library export.
Definition core_export.hpp:13
- Inheritance
- xtd::object → xtd::io::text_writer
- Header
#include <xtd/io/memory_stream>
- Namespace
- xtd::io
- Library
- xtd.core
|
bool | can_read () const noexcept override |
| Gets a value indicating whether the current stream supports reading.
|
|
bool | can_seek () const noexcept override |
| Gets a value indicating whether the current stream supports seeking.
|
|
bool | can_write () const noexcept override |
| Gets a value indicating whether the current stream supports writing.
|
|
xtd::size | capacity () const |
| Gets the number of bytes allocated for this stream.
|
|
void | capacity (xtd::size value) |
| Sets the number of bytes allocated for this stream.
|
|
xtd::size | length () const override |
| Gets the length of the stream in bytes.
|
|
xtd::size | position () const override |
| Gets the current position within the stream.
|
|
void | position (xtd::size value) override |
| Sets the current position within the stream.
|
|
|
void | flush () override |
| Overrides the Flush() method so that no action is performed.
|
|
xtd::size | read (xtd::array< xtd::byte > &buffer, size offset, size count) override |
| Reads a block of bytes from the current stream and writes the data to a buffer.
|
|
xtd::size | seek (std::streamoff offset, seek_origin loc) |
| Sets the position within the current stream to the specified value.
|
|
void | set_length (xtd::size value) override |
| Sets the length of the current stream to the specified value.
|
|
xtd::array< xtd::byte > | to_array () const |
| Writes the stream contents to a byte array, regardless of the Position property.
|
|
void | write (const xtd::array< xtd::byte > &buffer, size offset, size count) override |
| Writes a block of bytes to the current stream using data read from a buffer.
|
|
void | write_to (std::ostream &stream) |
| Writes the entire contents of this memory stream to another stream.
|
|
|
static xtd::io::null_stream | null_stream |
| A Stream with no backing store.
|
|
static constexpr int32 | eof |
| Represnets an eof value.
|
|
virtual bool | can_timeout () const noexcept |
| Gets a value that determines whether the current stream can time out.
|
|
virtual bool | is_closed () const noexcept |
| Indicates if the stream is closed.
|
|
virtual int32 | read_timeout () const |
| Gets a value, in milliseconds, that determines how long the stream will attempt to read before timing out.
|
|
virtual void | read_timeout (int32 value) |
| Sets a value, in milliseconds, that determines how long the stream will attempt to read before timing out.
|
|
virtual int32 | write_timeout () const |
| Gets a value, in milliseconds, that determines how long the stream will attempt to write before timing out.
|
|
virtual void | write_timeout (int32 value) |
| Sets a value, in milliseconds, that determines how long the stream will attempt to write before timing out.
|
|
void | copy_to (std::ostream &destination) |
| Reads the bytes from the current memory stream and writes them to another stream.
|
|
void | copy_to (std::ostream &destination, xtd::size buffer_size) |
| Reads the bytes from the current memory stream and writes them to another stream, using a specified buffer size.
|
|
virtual xtd::size | read (xtd::span< xtd::byte > &buffer) |
| When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
|
|
xtd::size | read_at_least (xtd::array< xtd::byte > &buffer, xtd::size minimum_bytes, bool throw_on_end_of_stream=true) |
| Reads at least a minimum number of bytes from the current stream and advances the position within the stream by the number of bytes read.
|
|
virtual int32 | read_byte () |
|
void | read_exactly (xtd::array< xtd::byte > &buffer) |
| Reads bytes from the current stream and advances the position within the stream until the buffer is filled.
|
|
void | read_exactly (xtd::array< xtd::byte > &buffer, xtd::size offset, xtd::size count) |
| Reads count number of bytes from the current stream and advances the position within the stream.
|
|
virtual void | write (xtd::span< const xtd::byte > buffer) |
|
virtual void | write_byte (xtd::byte value) |
|
| 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 xtd::size | get_hash_code () const noexcept |
| Serves as a hash function for a particular type.
|
|
virtual type_object | get_type () const noexcept |
| Gets the type of the current instance.
|
|
template<class object_t > |
xtd::uptr< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object.
|
|
virtual xtd::string | to_string () const noexcept |
| Returns a xtd::string that represents the current object.
|
|
template<class object_a_t , class object_b_t > |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal.
|
|
template<class object_a_t , class object_b_t > |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance.
|
|
| stream () |
| Initializes a new instance of the xtd::io::stream class.
|
|
| abstract_object ()=default |
| Initializes a new instance of the xtd::abstract_object class.
|
|