Xojo.IO.BinaryStream.Constructor(mb As MemoryBlock)

From Xojo Documentation


Creates a BinaryStream from a MemoryBlock.


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

Create binary data from an Image in the iOS project:

// MyImage is an iOSImage in the project
Var binaryData As New BinaryStream(MyImage.ToData("public.PNG"))