51 [[nodiscard]]
auto can_read() const noexcept ->
bool override;
55 [[nodiscard]] auto
can_seek() const noexcept ->
bool override;
59 [[nodiscard]] auto
can_write() const noexcept ->
bool override;
143 [[nodiscard]] auto abstract_read_byte_unchecked() ->
xtd::
byte;
144 auto abstract_write_byte_unchecked(
xtd::
byte b) ->
void;
150 bool writable =
true;
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
memory_stream(xtd::size capacity)
Initializes a new instance of the MemoryStream class with an expandable capacity initialized as speci...
auto capacity() const -> xtd::size
Gets the number of bytes allocated for this stream.
auto length() const -> xtd::size override
Gets the length of the stream in bytes.
auto can_write() const noexcept -> bool override
Gets a value indicating whether the current stream supports writing.
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 set_length(xtd::size value) -> void override
Sets the length of the current stream to the specified value.
auto write_to(std::ostream &stream) -> void
Writes the entire contents of this memory stream to another stream.
auto flush() -> void override
Overrides the Flush() method so that no action is performed.
auto seek(std::streamoff offset, seek_origin loc) -> xtd::size
Sets the position within the current stream to the specified value.
auto can_read() const noexcept -> bool override
Gets a value indicating whether the current stream supports reading.
memory_stream()
Initializes a new instance of the MemoryStream class with an expandable capacity initialized to zero.
auto to_array() const -> xtd::array< xtd::byte >
Writes the stream contents to a byte array, regardless of the Position property.
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 can_seek() const noexcept -> bool override
Gets a value indicating whether the current stream supports seeking.
auto position() const -> xtd::size override
Gets the current position within the stream.
Provides a generic view of a sequence of bytes. This is an abstract class.
Definition stream.hpp:40
stream()
Initializes a new instance of the xtd::io::stream class.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
null_ptr null
Represents a null pointer value.
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
ptr< type_t > new_ptr(args_t &&... args)
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24
seek_origin
Specifies the position in a stream to use for seeking.
Definition seek_origin.hpp:16
@ b
The B key.
Definition console_key.hpp:90
Contains xtd::collections::generic::list <type_t> class.
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.hpp:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::new_ptr method.
Contains xtd::io::stream class.