MemoryStream()

MemoryStream::MemoryStream() constructor

Constructs a new instance of the MemoryStream class with initial capacity equal to 0.

System::IO::MemoryStream::MemoryStream()

MemoryStream::MemoryStream(int) constructor

Constructs a new instance of the MemoryStream class that represents a stream based on a memory buffer of the specified size.

System::IO::MemoryStream::MemoryStream(int capacity_)

Arguments

ParameterTypeDescription
capacity_intThe size in bytes of a memory buffer associated with the stream represented by the object being created

MemoryStream::MemoryStream(const ArrayPtr<uint8_t>&, bool) constructor

Constructs a new instance of the MemoryStream class that represents a memory stream which is connected to the specified memory buffer. A parameter specifies if the stream is writable.

System::IO::MemoryStream::MemoryStream(const ArrayPtr<uint8_t> &content, bool writable=1)

Arguments

ParameterTypeDescription
contentconst ArrayPtr<uint8_t>&A byte array to be used as a memory buffer on which the stream represented by the object being created will be based
writableboolSpecifies if the stream should be writable

MemoryStream::MemoryStream(const ArrayPtr<uint8_t>&, int, int, bool, bool) constructor

Constructs a new instance of the MemoryStream class that represents a memory stream which is connected to a segment of the specified memory buffer starting at the specified index and including the specified number of elements. Parameters specifies if the stream is writable and if method GetBytes() can be called.

System::IO::MemoryStream::MemoryStream(const ArrayPtr<uint8_t> &content, int index, int count, bool writable=1, bool publiclyVisible=false)

Arguments

ParameterTypeDescription
contentconst ArrayPtr<uint8_t>&A byte array a segment of which is to be used as a memory buffer on which the stream represented by the object being created will be based
indexintA 0-based index of the element in content at which the segment begins
countintThe number of elements of content included in the segment
writableboolSpecifies if the stream should be writable
publiclyVisibleboolSpecifies if the underlying memory buffer should be made available to the caller of method GetByte()

See Also