.net - LotusNotes NotesStream to byte array / -
i want read content of notesstream object (com reference) without using file system. intension transfer content .net byte array. examples in vb.net because needed late binding @ time.
the way managed reading stream byte byte (assuming position in stream set 0
beforehand):
dim streamsize long = cint(notesstream.bytes) dim buffer(streamsizes - 1) byte = 0 (streamsize - 1) buffer(i) = notesstream.read(1)(0) next
this very slow compared using filesystem (notesstream.open()
).
the other solutions found gave me errors, 2 examples:
buffer = notesstream.read(streamsize)
-> error: object of type "system.byte[ * ]" cannot converted type "system.byte[]" / unable cast object of type "system.byte[ * ]" type "system.byte[]"
(without additional space character between brackets , asterisk, otherwise wouldn't have benn displayed correctly in post)
array.copy(notesstream.read(), 0, buffer, 0, streamsize)
-> error: source array not long enough. check srcindex , length, , array's lower bounds.
Comments
Post a Comment