public override void Write(byte[] buffer, int offset, int size) {
#if DEBUG
using (GlobalLog.SetThreadKind(ThreadKinds.User | ThreadKinds.Sync)) {
#endif
if (Logging.On) Logging.Enter(Logging.Web, this, "Write", "");
//
// Basic parameter validation
//
if (!WriteStream) {
throw new NotSupportedException(SR.GetString(SR.net_readonlystream));
}
if (buffer==null) {
throw new ArgumentNullException("buffer");
}
if (offset<0 || offset>buffer.Length) {
throw new ArgumentOutOfRangeException("offset");
}
if (size<0 || size>buffer.Length-offset) {
throw new ArgumentOutOfRangeException("size");
}
InternalWrite(false, buffer, offset, size, null, null );
if(Logging.On)Logging.Dump(Logging.Web, this, "Write", buffer, offset, size);
if(Logging.On)Logging.Exit(Logging.Web, this, "Write", "");
#if DEBUG
}
#endif
}