Delphi/Lazarus: Load Byte Array from MemoryStream
Question by Guest | 2018-01-09 at 20:31
I have recently read the tutorial on byte arrays in Delphi and Lazarus. Very handy, but at the moment I'm desperate to load a TMemoryStream into such a byte array.
Given is a memory stream and I would like to copy the bytes from this stream into a byte array. Can somebody help me with it?
Related Topics
Lazarus: Load File as Byte Array and save Byte Array as File
Tutorial | 0 Comments
Delphi/Lazarus: Show Byte Array as String of HEX Values
Tip | 0 Comments
PHP: Remove all empty elements from string array
Tip | 0 Comments
JavaScript: Create and Use Arrays
Info | 0 Comments
Send Form Input as an Array to PHP Script
Tip | 0 Comments
Delphi/Lazarus: Store and Save MemoryStream in FileStream
Info | 0 Comments
PHP: Write array to individual Variables
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
No problem, in the following example I will show you how to get the data from the memory stream into a byte array.
To have something in our stream, we first write a few bytes into the stream (array BA_IN). Then we write the contents of the stream into the byte array BA_OUT.
2018-01-09 at 21:52