Set the raw binary content of the stream.




void SetData(byte[] value)
void SetData(byte[] value, int index, int count)
void SetData(StreamObject source)

[Visual Basic]
Sub SetData(value() As Byte)
Sub SetData(value() As Byte, index As Integer, count As Integer)
Sub SetData(source As StreamObject)



Name Description
value The raw binary content to be assigned to the stream.
index The index in the array at which copying should start.
count The number of bytes to copy.
source The source stream from which to copy the data.




Set the raw binary content of the stream.

Compression settings are unaltered. So if - for example - you have a stream which is Flate compressed you must use SetData with Flate compressed data.

For this reason you may wish to call ClearData before using SetData.

Using the overload which accepts a StreamObject is equivalent to, but more efficient than, getting the data from the source StreamObject and then using SetData to assign it to this one.