nsresult rv = aIStream->Read(buf, 1024, &amt);
aIStream->Read(buf, 1024, &amt);
InputTestConsumer::OnDataAvailable(nsIChannel* channel,                                    nsISupports* context,                                   nsIInputStream *aIStream,                                    PRUint32 aSourceOffset,                                   PRUint32 aLength){  char buf[1025];  while (aLength > 0) {    PRUint32 amt;    nsresult rv = aIStream->Read(buf, 1024, &amt);    buf[amt] = '\0';    printf(buf);    aLength -= amt;  }  return NS_OK;}