return NS_NewInputStreamChannel(result, uri, stream, contentType, nsnull);
nsresult rv; static NS_DEFINE_CID(kInputStreamChannelCID, NS_INPUTSTREAMCHANNEL_CID); nsCOMPtr<nsIInputStreamChannel> channel = do_CreateInstance(kInputStreamChannelCID, &rv); if (NS_SUCCEEDED(rv)) { rv |= channel->SetURI(uri); rv |= channel->SetContentStream(stream); rv |= channel->SetContentType(contentType); if (contentCharset && !contentCharset->IsEmpty()) { rv |= channel->SetContentCharset(*contentCharset); } if (NS_SUCCEEDED(rv)) NS_ADDREF(*result = channel); } return rv;
NS_NewInputStreamChannel(nsIChannel      **result,                         nsIURI           *uri,                         nsIInputStream   *stream,                         const nsACString &contentType    = EmptyCString()){    return NS_NewInputStreamChannel(result, uri, stream, contentType, nsnull);}