public RequestStream GetRequestStream (bool chunked, long contentlength)
{
if (i_stream == null) {
byte [] buffer = ms.GetBuffer ();
int length = (int) ms.Length;
ms = null;
if (chunked) {
this.chunked = true;
context.Response.SendChunked = true;
i_stream = new ChunkedInputStream (context, stream, buffer, position, length - position);
} else {
i_stream = new RequestStream (stream, buffer, position, length - position, contentlength);
}
}
return i_stream;
}