Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Nested sealed class: RT.Util.MultipartFormDataHelper.MultipartFileStream

Summary

Encapsulates a stream used for writing a file body into a multipart/form-data stream.

Remarks

The main purpose is to prevent the caller accidentally closing the request stream (which results in an exception whose cause is pretty tricky to establish).

Instance methods

void
  • Overrides: Stream.Close()
Closes the stream and prevents further writing to this stream. You may call this explicitly; you may call Stream.Dispose instead, or you could just leave it up to MultipartFormDataHelper to close this stream automatically next time a new field or file is added, or when the helper itself is closed.
void
  • Overrides: Stream.Flush()
Flushes the request stream.
int
Read(byte[] buffer, int offset, int count)
  • Overrides: Stream.Read(byte[], int, int)
Throws a NotSupportedException.
long
Seek(long offset, SeekOrigin origin)
  • Overrides: Stream.Seek(long, SeekOrigin)
void
SetLength(long value)
  • Overrides: Stream.SetLength(long)
void
Write(byte[] buffer, int offset, int count)
  • Overrides: Stream.Write(byte[], int, int)
Writes file data to the request stream.

Instance properties

bool
  • Overrides: Stream.CanRead
Always false.
bool
  • Overrides: Stream.CanSeek
bool
  • Overrides: Stream.CanWrite
Always true.
long
  • Overrides: Stream.Length
Throws a NotSupportedException.
long
  • Overrides: Stream.Position