public void OnDataAvailable(nsIRequest aRequest, nsISupports aContext, nsIInputStream aInputStream, ulong aOffset, uint aCount) { // This gets called several times with small chunks of data. // Do what you need with the stream. In my case, I read it // in a small buffer, which then gets written to an output // filestream (not shown). // The aOffset parameter is the sum of all previously received data. var lInput = InputStream.Create(aInputStream); byte[] lBuffer = new byte[aCount]; lInput.Read(lBuffer, 0, (int)aCount); }
public InputStream OpenInputStream(uint offset) { return InputStream.Create(_cacheEntryDescriptor.OpenInputStream(offset)); }
public InputStream GetUploadStream() { return(InputStream.Create(_uploadChannel.GetUploadStreamAttribute())); }