database - Write file data directly to a property in my class -
i have class use send file data , database, question is. how write file data directly property in class without first saving data memorystream. there advantage doing this?
class rif public property filedata stream end class dim rif = new rif dim buf byte() = new byte(1023) {} using stream stream = myresp.getresponsestream() rif.filedata = stream.read(buf, 0, 1024) dim count integer count = stream.read(buf, 0, 1024) rif.filedata.write(buf, 0, count) loop while stream.canread andalso count > 0
as looks like, have proper method.
there may option use pipes, too. perhaps effort , gives no gain in performance.
so me looks have used common , , recommended technique.
best regards
Comments
Post a Comment