Click or drag to resize
StreamExtensions Class
Provides extension methods for the Stream class.
Inheritance Hierarchy
SystemObject
  Rackspace.ThreadingStreamExtensions

Namespace: Rackspace.Threading
Assembly: Rackspace.Threading (in Rackspace.Threading.dll) Version: 2.1.0-beta1
Syntax
public static class StreamExtensions
Methods
  NameDescription
Public methodStatic memberCopyToAsync(Stream, Stream)
Asynchronously reads the bytes from a source stream and writes them to a destination stream.
Public methodStatic memberCopyToAsync(Stream, Stream, Int32)
Asynchronously reads the bytes from a source stream and writes them to a destination stream, using a specified buffer size.
Public methodStatic memberCopyToAsync(Stream, Stream, Int32, CancellationToken)
Asynchronously reads the bytes from a source stream and writes them to a destination stream, using a specified buffer size and cancellation token.
Public methodStatic memberFlushAsync(Stream)
Asynchronously clears all buffers for a stream and causes any buffered data to be written to the underlying device.
Public methodStatic memberFlushAsync(Stream, CancellationToken)
Asynchronously clears all buffers for a stream and causes any buffered data to be written to the underlying device, and monitors cancellation requests.
Public methodStatic memberReadAsync(Stream, Byte, Int32, Int32)
Asynchronously reads a sequence of bytes from a stream and advances the position within the stream by the number of bytes read.
Public methodStatic memberReadAsync(Stream, Byte, Int32, Int32, CancellationToken)
Asynchronously reads a sequence of bytes from a stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.
Public methodStatic memberWriteAsync(Stream, Byte, Int32, Int32)
Asynchronously writes a sequence of bytes to a stream and advances the position within the stream by the number of bytes written.
Public methodStatic memberWriteAsync(Stream, Byte, Int32, Int32, CancellationToken)
Asynchronously writes a sequence of bytes to a stream, advances the position within the stream by the number of bytes written, and monitors cancellation requests.
Top
Version Information

.NET for Windows Store apps

Supported in: Windows 8

.NET Framework

Supported in: 4.5, 4.0, 3.5

Portable Class Library

Supported in: Portable Class Library (Legacy), Portable Class Library

Threading Library

Supported in: 2.1, 2.0, 1.1, 1.0
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