ByteRangeStreamContent Class

 

HttpContent implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. The ByteRangeStreamContent supports one or more byte ranges regardless of whether the ranges are consecutive or not. If there is only one range then a single partial response body containing a Content-Range header is generated. If there are more than one ranges then a multipart/byteranges response is generated where each body part contains a range indicated by the associated Content-Range header field.

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

Inheritance Hierarchy

System.Object
  System.Net.Http.HttpContent
    System.Net.Http.ByteRangeStreamContent

Syntax

public class ByteRangeStreamContent : HttpContent
public ref class ByteRangeStreamContent : HttpContent
type ByteRangeStreamContent = 
    class
        inherit HttpContent
    end
Public Class ByteRangeStreamContent
    Inherits HttpContent

Constructors

Name Description
System_CAPS_pubmethod ByteRangeStreamContent(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_pubmethod ByteRangeStreamContent(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_pubmethod ByteRangeStreamContent(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_pubmethod ByteRangeStreamContent(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.

Properties

Name Description
System_CAPS_pubproperty Headers

(Inherited from HttpContent.)

Methods

Name Description
System_CAPS_pubmethod CopyToAsync(Stream)

(Inherited from HttpContent.)

System_CAPS_pubmethod CopyToAsync(Stream, TransportContext)

(Inherited from HttpContent.)

System_CAPS_protmethod CreateContentReadStreamAsync()

(Inherited from HttpContent.)

System_CAPS_pubmethod Dispose()

(Inherited from HttpContent.)

System_CAPS_protmethod Dispose(Boolean)

Releases the resources used by the current instance of the ByteRangeStreamContent class.(Overrides HttpContent.Dispose(Boolean).)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod LoadIntoBufferAsync()

(Inherited from HttpContent.)

System_CAPS_pubmethod LoadIntoBufferAsync(Int64)

(Inherited from HttpContent.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ReadAsByteArrayAsync()

(Inherited from HttpContent.)

System_CAPS_pubmethod ReadAsStreamAsync()

(Inherited from HttpContent.)

System_CAPS_pubmethod ReadAsStringAsync()

(Inherited from HttpContent.)

System_CAPS_protmethod SerializeToStreamAsync(Stream, TransportContext)

Asynchronously serialize and write the byte range to an HTTP content stream.(Overrides HttpContent.SerializeToStreamAsync(Stream, TransportContext).)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_protmethod TryComputeLength(Int64)

Determines whether a byte array has a valid length in bytes.(Overrides HttpContent.TryComputeLength(Int64).)

Extension Methods

Name Description
System_CAPS_pubmethod GetODataMessageReaderAsync(ODataMessageReaderSettings)

Overloaded. Gets the ODataMessageReader for the HttpContent stream. (Defined by ODataHttpContentExtensions.)

System_CAPS_pubmethod GetODataMessageReaderAsync(ODataMessageReaderSettings)

Overloaded. Gets the ODataMessageReader for the HttpContent stream.(Defined by ODataHttpContentExtensions.)

System_CAPS_pubmethod GetODataMessageReaderAsync(ODataMessageReaderSettings, CancellationToken)

Overloaded. Gets the ODataMessageReader for the HttpContent stream. (Defined by ODataHttpContentExtensions.)

System_CAPS_pubmethod GetODataMessageReaderAsync(ODataMessageReaderSettings, CancellationToken)

Overloaded. Gets the ODataMessageReader for the HttpContent stream.(Defined by ODataHttpContentExtensions.)

System_CAPS_pubmethod IsFormData()

Determines whether the specified content is HTML form URL-encoded data.(Defined by HttpContentFormDataExtensions.)

System_CAPS_pubmethod IsHttpRequestMessageContent()

Determines whether the specified content is HTTP request message content.(Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod IsHttpResponseMessageContent()

Determines whether the specified content is HTTP response message content.(Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod IsMimeMultipartContent()

Overloaded. Determines whether the specified content is MIME multipart content.(Defined by HttpContentMultipartExtensions.)

System_CAPS_pubmethod IsMimeMultipartContent(String)

Overloaded. Determines whether the specified content is MIME multipart content with the specified subtype.(Defined by HttpContentMultipartExtensions.)

System_CAPS_pubmethod ReadAsAsync(Type)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync(Type, CancellationToken)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.(Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync(Type, IEnumerable<MediaTypeFormatter>)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, CancellationToken)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.(Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, IFormatterLogger)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, IFormatterLogger, CancellationToken)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.(Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync<T>()

Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync<T>(CancellationToken)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance.(Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync<T>(IEnumerable<MediaTypeFormatter>)

Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, CancellationToken)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance.(Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, IFormatterLogger)

Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, IFormatterLogger, CancellationToken)

Overloaded. Returns a Task that will yield an object of the specified type from the content instance.(Defined by HttpContentExtensions.)

System_CAPS_pubmethod ReadAsFormDataAsync()

Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object.(Defined by HttpContentFormDataExtensions.)

System_CAPS_pubmethod ReadAsFormDataAsync(CancellationToken)

Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object.(Defined by HttpContentFormDataExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync()

Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync(CancellationToken)

Overloaded. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync(String)

Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync(String, CancellationToken)

Overloaded. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync(String, Int32)

Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync(String, Int32, CancellationToken)

Overloaded. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync(String, Int32, Int32)

Overloaded. Reads the HttpContent as an HttpRequestMessage.(Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpRequestMessageAsync(String, Int32, Int32, CancellationToken)

Overloaded. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpResponseMessageAsync()

Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpResponseMessageAsync(CancellationToken)

Overloaded. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpResponseMessageAsync(Int32)

Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpResponseMessageAsync(Int32, CancellationToken)

Overloaded. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpResponseMessageAsync(Int32, Int32)

Overloaded. Reads the HttpContent as an HttpResponseMessage.(Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsHttpResponseMessageAsync(Int32, Int32, CancellationToken)

Overloaded. (Defined by HttpContentMessageExtensions.)

System_CAPS_pubmethod ReadAsMultipartAsync()

Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result.(Defined by HttpContentMultipartExtensions.)

System_CAPS_pubmethod ReadAsMultipartAsync(CancellationToken)

Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result.(Defined by HttpContentMultipartExtensions.)

System_CAPS_pubmethod ReadAsMultipartAsync<T>(T)

Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written.(Defined by HttpContentMultipartExtensions.)

System_CAPS_pubmethod ReadAsMultipartAsync<T>(T, CancellationToken)

Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written.(Defined by HttpContentMultipartExtensions.)

System_CAPS_pubmethod ReadAsMultipartAsync<T>(T, Int32)

Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.(Defined by HttpContentMultipartExtensions.)

System_CAPS_pubmethod ReadAsMultipartAsync<T>(T, Int32, CancellationToken)

Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.(Defined by HttpContentMultipartExtensions.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Net.Http Namespace

Return to top