ByteRangeStreamContent Constructor

 

Namespace:   System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

NameDescription
System_CAPS_pubmethodByteRangeStreamContent(Stream, RangeHeaderValue, MediaTypeHeaderValue)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

System_CAPS_pubmethodByteRangeStreamContent(Stream, RangeHeaderValue, MediaTypeHeaderValue, Int32)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

System_CAPS_pubmethodByteRangeStreamContent(Stream, RangeHeaderValue, String)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

System_CAPS_pubmethodByteRangeStreamContent(Stream, RangeHeaderValue, String, Int32)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

Return to top

ByteRangeStreamContent Constructor (Stream, RangeHeaderValue, MediaTypeHeaderValue)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

public ByteRangeStreamContent(
	Stream content,
	RangeHeaderValue range,
	MediaTypeHeaderValue mediaType
)

Parameters

content
Type: System.IO.Stream

The stream over which to generate a byte range view.

range
Type: System.Net.Http.Headers.RangeHeaderValue

The range or ranges, typically obtained from the Range HTTP request header field.

mediaType
Type: System.Net.Http.Headers.MediaTypeHeaderValue

The media type of the content stream.

Return to top

ByteRangeStreamContent Constructor (Stream, RangeHeaderValue, MediaTypeHeaderValue, Int32)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

public ByteRangeStreamContent(
	Stream content,
	RangeHeaderValue range,
	MediaTypeHeaderValue mediaType,
	int bufferSize
)

Parameters

content
Type: System.IO.Stream

The stream over which to generate a byte range view.

range
Type: System.Net.Http.Headers.RangeHeaderValue

The range or ranges, typically obtained from the Range HTTP request header field.

mediaType
Type: System.Net.Http.Headers.MediaTypeHeaderValue

The media type of the content stream.

bufferSize
Type: System.Int32

The buffer size used when copying the content stream.

Return to top

ByteRangeStreamContent Constructor (Stream, RangeHeaderValue, String)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

public ByteRangeStreamContent(
	Stream content,
	RangeHeaderValue range,
	string mediaType
)

Parameters

content
Type: System.IO.Stream

The stream over which to generate a byte range view.

range
Type: System.Net.Http.Headers.RangeHeaderValue

The range or ranges, typically obtained from the Range HTTP request header field.

mediaType
Type: System.String

The media type of the content stream.

Return to top

ByteRangeStreamContent Constructor (Stream, RangeHeaderValue, String, Int32)

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an InvalidByteRangeException is thrown indicating the valid Content-Range of the content.

public ByteRangeStreamContent(
	Stream content,
	RangeHeaderValue range,
	string mediaType,
	int bufferSize
)

Parameters

content
Type: System.IO.Stream

The stream over which to generate a byte range view.

range
Type: System.Net.Http.Headers.RangeHeaderValue

The range or ranges, typically obtained from the Range HTTP request header field.

mediaType
Type: System.String

The media type of the content stream.

bufferSize
Type: System.Int32

The buffer size used when copying the content stream.

Return to top
Show: