BinaryStream.Constructor(mb as MemoryBlock)

From Xojo Documentation

Revision as of 18:40, 16 July 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


BinaryStream.Constructor(mb as MemoryBlock)

Creates a BinaryStream from a MemoryBlock.


All BinaryStream functions are supported. If the MemoryBlock was created from a Declare, then the Length property of the BinaryStream will always report -1.

A BinaryStream created using a MemoryBlock will automatically re-size the MemoryBlock as needed to contain any additional data written to the stream.

Sample Code

Var mb As New MemoryBlock(100)
Var b As New BinaryStream(mb)