PLCnext API Documentation  22.9.0.33
Public Member Functions | Protected Member Functions | List of all members
Arp::System::Commons::Io::MemoryStream Class Reference
Inheritance diagram for Arp::System::Commons::Io::MemoryStream:
Inheritance graph

Public Member Functions

 MemoryStream (void)
 Initializes a new instance of the T:System.IO.MemoryStream class with an expandable capacity initialized to zero. More...
 
 MemoryStream (size_t capacity)
 Initializes a new instance of the T:System.IO.MemoryStream class with an expandable capacity initialized as specified. More...
 
 MemoryStream (byte *buffer, size_t bufferSize)
 Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified byte array. More...
 
 MemoryStream (byte *buffer, size_t bufferSize, boolean writable)
 Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified byte array with the P:System.IO.MemoryStream.CanWrite property set as specified. More...
 
 MemoryStream (byte *buffer, size_t bufferSize, size_t index, size_t count)
 Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified region (index) of a byte array. More...
 
 MemoryStream (byte *buffer, size_t bufferSize, size_t index, size_t count, boolean writable)
 Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified region of a byte array, with the P:System.IO.MemoryStream.CanWrite property set as specified. More...
 
 MemoryStream (byte *buffer, size_t bufferSize, size_t index, size_t count, boolean writable, boolean publiclyVisible)
 Initializes a new instance of the T:System.IO.MemoryStream class based on the specified region of a byte array, with the P:System.IO.MemoryStream.CanWrite property set as specified, and the ability to call M:System.IO.MemoryStream.GetBuffer set as specified. More...
 
 MemoryStream (const MemoryStream &arg)=delete
 Copy constructor. More...
 
MemoryStreamoperator= (const MemoryStream &arg)=delete
 Assignment operator. More...
 
virtual ~MemoryStream (void)
 Destructs this instance and frees all resources. More...
 
boolean CanRead (void) override
 
boolean CanWrite (void) override
 
boolean CanSeek (void) override
 
size_t GetLength (void) override
 
void SetLength (size_t argLength) override
 
size_t GetPosition (void) override
 
void SetPosition (size_t argPostion) override
 
virtual size_t GetCapacity (void)
 
virtual void SetCapacity (size_t argCapacity)
 
void Flush (void) override
 
size_t Seek (size_t offset, SeekOrigin origin) override
 
size_t Read (byte *pBuffer, size_t bufferSize, size_t offset, size_t count) override
 
std::vector< byteToArray (void)
 
void Write (const byte *pBuffer, size_t bufferSize, size_t offset, size_t count) override
 
virtual void WriteTo (Stream &stream)
 
- Public Member Functions inherited from Arp::System::Commons::Io::Stream
 Stream (void)
 Constructs an Stream instance. More...
 
 Stream (const Stream &arg)=delete
 Copy constructor. More...
 
Streamoperator= (const Stream &arg)=delete
 Assignment operator. More...
 
virtual ~Stream (void)
 Destructs this instance and frees all resources. More...
 
virtual byte ReadByte (void)
 
virtual void WriteByte (byte value)
 
virtual void CopyTo (Stream &other)
 
void Dispose (void)
 
void Close (void)
 

Protected Member Functions

void InternalDispose (void) override
 
- Protected Member Functions inherited from Arp::System::Commons::Io::Stream
boolean IsDisposed (void)
 
void CheckDisposed (void)
 

Additional Inherited Members

- Static Public Attributes inherited from Arp::System::Commons::Io::Stream
static NullStream Empty
 

Constructor & Destructor Documentation

◆ MemoryStream() [1/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( void  )
inline

Initializes a new instance of the T:System.IO.MemoryStream class with an expandable capacity initialized to zero.

◆ MemoryStream() [2/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( size_t  capacity)
inline

Initializes a new instance of the T:System.IO.MemoryStream class with an expandable capacity initialized as specified.

Parameters
capacityThe initial size of the internal array in bytes.
Exceptions
T:System.ArgumentOutOfRangeExceptioncapacity is negative.

◆ MemoryStream() [3/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( byte buffer,
size_t  bufferSize 
)
inline

Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified byte array.

Parameters
bufferThe array of unsigned bytes from which to create the current stream.
Exceptions
T:System.ArgumentNullExceptionbuffer is null.

◆ MemoryStream() [4/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( byte buffer,
size_t  bufferSize,
boolean  writable 
)
inline

Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified byte array with the P:System.IO.MemoryStream.CanWrite property set as specified.

Parameters
bufferThe array of unsigned bytes from which to create this stream.
writableThe setting of the P:System.IO.MemoryStream.CanWrite property, which determines whether the stream supports writing.
Exceptions
T:System.ArgumentNullExceptionbuffer is null.

◆ MemoryStream() [5/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( byte buffer,
size_t  bufferSize,
size_t  index,
size_t  count 
)
inline

Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified region (index) of a byte array.

Parameters
countThe length of the stream in bytes.
bufferThe array of unsigned bytes from which to create this stream.
indexThe index into buffer at which the stream begins.
Exceptions
T:System.ArgumentNullExceptionbuffer is null.
T:System.ArgumentOutOfRangeExceptionindex or count is less than zero.
T:System.ArgumentExceptionThe sum of index and count is greater than the length of buffer.

◆ MemoryStream() [6/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( byte buffer,
size_t  bufferSize,
size_t  index,
size_t  count,
boolean  writable 
)
inline

Initializes a new non-resizable instance of the T:System.IO.MemoryStream class based on the specified region of a byte array, with the P:System.IO.MemoryStream.CanWrite property set as specified.

Parameters
countThe length of the stream in bytes.
bufferThe array of unsigned bytes from which to create this stream.
writableThe setting of the P:System.IO.MemoryStream.CanWrite property, which determines whether the stream supports writing.
indexThe index in buffer at which the stream begins.
Exceptions
T:System.ArgumentExceptionThe sum of index and count is greater than the length of buffer.
T:System.ArgumentNullExceptionbuffer is null.
T:System.ArgumentOutOfRangeExceptionindex or count are negative.

◆ MemoryStream() [7/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( byte buffer,
size_t  bufferSize,
size_t  index,
size_t  count,
boolean  writable,
boolean  publiclyVisible 
)
inline

Initializes a new instance of the T:System.IO.MemoryStream class based on the specified region of a byte array, with the P:System.IO.MemoryStream.CanWrite property set as specified, and the ability to call M:System.IO.MemoryStream.GetBuffer set as specified.

Parameters
countThe length of the stream in bytes.
bufferThe array of unsigned bytes from which to create this stream.
writableThe setting of the P:System.IO.MemoryStream.CanWrite property, which determines whether the stream supports writing.
publiclyVisibletrue to enable M:System.IO.MemoryStream.GetBuffer, which returns the unsigned byte array from which the stream was created; otherwise, false.
indexThe index into buffer at which the stream begins.
Exceptions
T:System.ArgumentOutOfRangeExceptionindex or count is negative.
T:System.ArgumentExceptionThe buffer length minus index is less than count.
T:System.ArgumentNullExceptionbuffer is null.

◆ MemoryStream() [8/8]

Arp::System::Commons::Io::MemoryStream::MemoryStream ( const MemoryStream arg)
delete

Copy constructor.

◆ ~MemoryStream()

Arp::System::Commons::Io::MemoryStream::~MemoryStream ( void  )
inlinevirtual

Destructs this instance and frees all resources.

Member Function Documentation

◆ operator=()

MemoryStream& Arp::System::Commons::Io::MemoryStream::operator= ( const MemoryStream arg)
delete

Assignment operator.


The documentation for this class was generated from the following file: