Creates a stream whose backing store is memory.
memory_stream()
Initializes a new instance of the MemoryStream class with an expandable capacity initialized to zero.
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
|
| auto | can_read () const noexcept -> bool override |
| | Gets a value indicating whether the current stream supports reading.
|
| |
| auto | can_seek () const noexcept -> bool override |
| | Gets a value indicating whether the current stream supports seeking.
|
| |
| auto | can_write () const noexcept -> bool override |
| | Gets a value indicating whether the current stream supports writing.
|
| |
| auto | capacity () const -> xtd::size |
| | Gets the number of bytes allocated for this stream.
|
| |
| auto | capacity (xtd::size value) -> void |
| | Sets the number of bytes allocated for this stream.
|
| |
| auto | length () const -> xtd::size override |
| | Gets the length of the stream in bytes.
|
| |
| auto | position () const -> xtd::size override |
| | Gets the current position within the stream.
|
| |
| auto | position (xtd::size value) -> void override |
| | Sets the current position within the stream.
|
| |
|
| auto | flush () -> void override |
| | Overrides the Flush() method so that no action is performed.
|
| |
| auto | read (xtd::array< xtd::byte > &buffer, size offset, size count) -> xtd::size override |
| | Reads a block of bytes from the current stream and writes the data to a buffer.
|
| |
| auto | seek (std::streamoff offset, seek_origin loc) -> xtd::size |
| | Sets the position within the current stream to the specified value.
|
| |
| auto | set_length (xtd::size value) -> void override |
| | Sets the length of the current stream to the specified value.
|
| |
| auto | to_array () const -> xtd::array< xtd::byte > |
| | Writes the stream contents to a byte array, regardless of the Position property.
|
| |
| auto | write (const xtd::array< xtd::byte > &buffer, size offset, size count) -> void override |
| | Writes a block of bytes to the current stream using data read from a buffer.
|
| |
| auto | write_to (std::ostream &stream) -> void |
| | Writes the entire contents of this memory stream to another stream.
|
| |
| virtual auto | read (xtd::span< xtd::byte > &buffer) -> xtd::size |
| | 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.
|
| |
| virtual auto | write (xtd::span< const xtd::byte > buffer) -> void |
| |
|
| static xtd::io::null_stream | null_stream |
| | A Stream with no backing store.
|
| |
| static constexpr xtd::int32 | eof |
| | Represnets an eof value.
|
| |
| virtual auto | can_timeout () const noexcept -> bool |
| | Gets a value that determines whether the current stream can time out.
|
| |
| virtual auto | is_closed () const noexcept -> bool |
| | Indicates if the stream is closed.
|
| |
| virtual auto | read_timeout () const -> xtd::int32 |
| | Gets a value, in milliseconds, that determines how long the stream will attempt to read before timing out.
|
| |
| virtual auto | read_timeout (xtd::int32 value) -> void |
| | Sets a value, in milliseconds, that determines how long the stream will attempt to read before timing out.
|
| |
| virtual auto | write_timeout () const -> xtd::int32 |
| | Gets a value, in milliseconds, that determines how long the stream will attempt to write before timing out.
|
| |
| virtual auto | write_timeout (xtd::int32 value) -> void |
| | Sets a value, in milliseconds, that determines how long the stream will attempt to write before timing out.
|
| |
| auto | copy_to (std::ostream &destination) -> void |
| | Reads the bytes from the current memory stream and writes them to another stream.
|
| |
| auto | copy_to (std::ostream &destination, xtd::size buffer_size) -> void |
| | Reads the bytes from the current memory stream and writes them to another stream, using a specified buffer size.
|
| |
| auto | read_at_least (xtd::array< xtd::byte > &buffer, xtd::size minimum_bytes, bool throw_on_end_of_stream=true) -> xtd::size |
| | 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 auto | read_byte () -> xtd::int32 |
| |
| auto | read_exactly (xtd::array< xtd::byte > &buffer) -> void |
| | Reads bytes from the current stream and advances the position within the stream until the buffer is filled.
|
| |
| auto | read_exactly (xtd::array< xtd::byte > &buffer, xtd::size offset, xtd::size count) -> void |
| | Reads count number of bytes from the current stream and advances the position within the stream.
|
| |
|
virtual auto | write_byte (xtd::byte value) -> void |
| |
| | 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::unique_ptr_object< object_t > | memberwise_clone () const |
| | Creates a shallow copy of the current object.
|
| |
| virtual xtd::string | to_string () const |
| | 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.
|
| |