Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

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.

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

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
public class ByteRangeStreamContent : HttpContent

The ByteRangeStreamContent type exposes the following members.

  NameDescription
Public methodByteRangeStreamContent(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 methodByteRangeStreamContent(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 methodByteRangeStreamContent(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 methodByteRangeStreamContent(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.
Top
  NameDescription
Public propertyHeadersGets the HTTP content headers as defined in RFC 2616. (Inherited from HttpContent.)
Top
  NameDescription
Public methodCopyToAsync(Stream)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Public methodCopyToAsync(Stream, TransportContext)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Protected methodCreateContentReadStreamAsync (Inherited from HttpContent.)
Public methodDispose()Releases the unmanaged resources and disposes of the managed resources used by the HttpContent. (Inherited from HttpContent.)
Protected methodDispose(Boolean)Releases the resources used by the current instance of the ByteRangeStreamContent class. (Overrides HttpContent.Dispose(Boolean).)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodLoadIntoBufferAsync()Serialize the HTTP content to a memory buffer as an asynchronous operation. (Inherited from HttpContent.)
Public methodLoadIntoBufferAsync(Int64) (Inherited from HttpContent.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReadAsByteArrayAsync (Inherited from HttpContent.)
Public methodReadAsStreamAsync (Inherited from HttpContent.)
Public methodReadAsStringAsync (Inherited from HttpContent.)
Protected methodSerializeToStreamAsync(Stream, TransportContext)Serialize the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Protected methodSerializeToStreamAsync(Stream, TransportContext)Asynchronously serialize and write the byte range to an HTTP content stream.
Public methodToString (Inherited from Object.)
Protected methodTryComputeLengthDetermines whether a byte array has a valid length in bytes. (Overrides HttpContent.TryComputeLength(Int64).)
Top
  NameDescription
Public Extension MethodIsFormDataDetermines whether the specified content is HTML form URL-encoded data. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodIsHttpRequestMessageContentDetermines whether the specified content is HTTP request message content. (Defined by HttpContentMessageExtensions.)
Public Extension MethodIsHttpResponseMessageContentDetermines whether the specified content is HTTP response message content. (Defined by HttpContentMessageExtensions.)
Public Extension MethodIsMimeMultipartContent()Overloaded. Determines whether the specified content is MIME multipart content. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodIsMimeMultipartContent(String)Overloaded. Determines whether the specified content is MIME multipart content with the specified subtype. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsAsync(Type)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(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.)
Public Extension MethodReadAsAsync(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.)
Public Extension MethodReadAsAsync(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.)
Public Extension MethodReadAsAsync(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.)
Public Extension MethodReadAsAsync(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.)
Public Extension MethodReadAsAsync<T>()Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<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.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<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.)
Public Extension MethodReadAsAsync<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.)
Public Extension MethodReadAsFormDataAsync()Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodReadAsFormDataAsync(CancellationToken)Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync()Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, Int32)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync()Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32)Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, Int32)Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsMultipartAsync()Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync(CancellationToken)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<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.)
Public Extension MethodReadAsMultipartAsync<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.)
Public Extension MethodReadAsMultipartAsync<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.)
Public Extension MethodReadAsMultipartAsync<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.)
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.