I am using Astreams Prefix to send files and found that when using write2 transmission works only partially and files are not sent fully.
I wrote this code to get over the problem and it works :
Any idea ?
I saw a previous complaint here http://www.b4x.com/forum/bugs-wishlist/19849-something-asyncstreams.html#post114532
I wrote this code to get over the problem and it works :
B4X:
count = raf.ReadBytes(buffer, 0, Min(8188,SizeM), position)
'AStreams.Write2(buffer,0,count) 'this write2 doesn't work ...
Dim tempbuf(count) As Byte
bc.ArrayCopy(buffer,0,tempbuf,0,count)
AStreams.Write(tempbuf)
Any idea ?
I saw a previous complaint here http://www.b4x.com/forum/bugs-wishlist/19849-something-asyncstreams.html#post114532