Can't you just read it into the MemoryBlock as a single string.
j = theFile.Length
mb = New MemoryBlock(j)
mb.String(0, j) = b.Read(j)
I use something similar to read data from TCP sockets and it works.
Brian
Is there a way to read a BinaryStream into a MemoryBlock other than
byte by byte as in the following? This is the only method of doing
so that I could get to work. Sure seems like there should be some
way to use the Read(x) method to read the entire file in at once but
if there is, how to do it has eluded me so far.
j = theFile.Length
n = j - 1
mb = New MemoryBlock(j)
For i = 0 to n
mb.Byte(i) = b.ReadByte
Next i
=== A Mac addict in Tennessee ===
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>