mscorlib(4.0.0.0) API with additions
|
Provides a generic view of a sequence of bytes. This is an abstract class.To browse the .NET Framework source code for this type, see the Reference Source. More...
Public Member Functions | |
Task | CopyToAsync (Stream destination) |
Asynchronously reads the bytes from the current stream and writes them to another stream. More... | |
Task | CopyToAsync (Stream destination, int bufferSize) |
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size. More... | |
virtual Task | CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken) |
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token. More... | |
void | CopyTo (Stream destination) |
Reads the bytes from the current stream and writes them to another stream. More... | |
void | CopyTo (Stream destination, int bufferSize) |
Reads the bytes from the current stream and writes them to another stream, using a specified buffer size. More... | |
virtual void | Close () |
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed. More... | |
void | Dispose () |
Releases all resources used by the T:System.IO.Stream. More... | |
abstract void | Flush () |
When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. More... | |
Task | FlushAsync () |
Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. More... | |
virtual Task | FlushAsync (CancellationToken cancellationToken) |
Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests. More... | |
virtual IAsyncResult | BeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state) |
Begins an asynchronous read operation. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More... | |
virtual int | EndRead (IAsyncResult asyncResult) |
Waits for the pending asynchronous read to complete. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More... | |
Task< int > | ReadAsync (byte[] buffer, int offset, int count) |
Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. More... | |
virtual Task< int > | ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken) |
Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests. More... | |
virtual IAsyncResult | BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state) |
Begins an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More... | |
virtual void | EndWrite (IAsyncResult asyncResult) |
Ends an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.) More... | |
Task | WriteAsync (byte[] buffer, int offset, int count) |
Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. More... | |
virtual Task | WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken) |
Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests. More... | |
abstract long | Seek (long offset, SeekOrigin origin) |
When overridden in a derived class, sets the position within the current stream. More... | |
abstract void | SetLength (long value) |
When overridden in a derived class, sets the length of the current stream. More... | |
abstract int | Read ([In] [Out] byte[] buffer, int offset, int count) |
When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. More... | |
virtual int | ReadByte () |
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. More... | |
abstract void | Write (byte[] buffer, int offset, int count) |
When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. More... | |
virtual void | WriteByte (byte value) |
Writes a byte to the current position in the stream and advances the position within the stream by one byte. More... | |
![]() | |
object | GetLifetimeService () |
Retrieves the current lifetime service object that controls the lifetime policy for this instance. More... | |
virtual object | InitializeLifetimeService () |
Obtains a lifetime service object to control the lifetime policy for this instance. More... | |
virtual ObjRef | CreateObjRef (Type requestedType) |
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. More... | |
Static Public Member Functions | |
static Stream | Synchronized (Stream stream) |
Creates a thread-safe (synchronized) wrapper around the specified T:System.IO.Stream object. More... | |
Static Public Attributes | |
static readonly Stream | Null = new NullStream() |
A Stream with no backing store. More... | |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
Releases the unmanaged resources used by the T:System.IO.Stream and optionally releases the managed resources. More... | |
virtual WaitHandle | CreateWaitHandle () |
Allocates a T:System.Threading.WaitHandle object. More... | |
virtual void | ObjectInvariant () |
Provides support for a T:System.Diagnostics.Contracts.Contract. More... | |
Stream () | |
Initializes a new instance of the T:System.IO.Stream class. More... | |
![]() | |
MarshalByRefObject | MemberwiseClone (bool cloneIdentity) |
Creates a shallow copy of the current T:System.MarshalByRefObject object. More... | |
Properties | |
abstract bool | CanRead [get] |
When overridden in a derived class, gets a value indicating whether the current stream supports reading. More... | |
abstract bool | CanSeek [get] |
When overridden in a derived class, gets a value indicating whether the current stream supports seeking. More... | |
virtual bool | CanTimeout [get] |
Gets a value that determines whether the current stream can time out. More... | |
abstract bool | CanWrite [get] |
When overridden in a derived class, gets a value indicating whether the current stream supports writing. More... | |
abstract long | Length [get] |
When overridden in a derived class, gets the length in bytes of the stream. More... | |
abstract long | Position [get, set] |
When overridden in a derived class, gets or sets the position within the current stream. More... | |
virtual int | ReadTimeout [get, set] |
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. More... | |
virtual int | WriteTimeout [get, set] |
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. More... | |
Provides a generic view of a sequence of bytes. This is an abstract class.To browse the .NET Framework source code for this type, see the Reference Source.
|
protected |
|
virtual |
Begins an asynchronous read operation. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)
buffer | The buffer to read the data into. |
offset | The byte offset in buffer at which to begin writing data read from the stream. |
count | The maximum number of bytes to read. |
callback | An optional asynchronous callback, to be called when the read is complete. |
state | A user-provided object that distinguishes this particular asynchronous read request from other requests. |
T:System.IO.IOException | Attempted an asynchronous read past the end of the stream, or a disk error occurs. |
T:System.ArgumentException | One or more of the arguments is invalid. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
T:System.NotSupportedException | The current Stream implementation does not support the read operation. |
Reimplemented in System.IO.FileStream, System.Net.Security.NegotiateStream, System.Net.Security.SslStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.Net.Sockets.NetworkStream, System.IO.Pipes.PipeStream, System.IO.BufferedStream, System.IO.Compression.DeflateStream, and System.IO.Compression.GZipStream.
|
virtual |
Begins an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)
buffer | The buffer to write data from. |
offset | The byte offset in buffer from which to begin writing. |
count | The maximum number of bytes to write. |
callback | An optional asynchronous callback, to be called when the write is complete. |
state | A user-provided object that distinguishes this particular asynchronous write request from other requests. |
IAsyncResult
that represents the asynchronous write, which could still be pending.T:System.IO.IOException | Attempted an asynchronous write past the end of the stream, or a disk error occurs. |
T:System.ArgumentException | One or more of the arguments is invalid. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
T:System.NotSupportedException | The current Stream implementation does not support the write operation. |
Reimplemented in System.IO.FileStream, System.Net.Security.NegotiateStream, System.IO.BufferedStream, System.Net.Security.SslStream, System.IO.Pipes.PipeStream, System.IO.Compression.DeflateStream, System.Net.Sockets.NetworkStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, and System.IO.Compression.GZipStream.
|
virtual |
void System.IO.Stream.CopyTo | ( | Stream | destination | ) |
Reads the bytes from the current stream and writes them to another stream.
destination | The stream to which the contents of the current stream will be copied. |
T:System.ArgumentNullException | destination is null . |
T:System.NotSupportedException | The current stream does not support reading.-or- destination does not support writing. |
T:System.ObjectDisposedException | Either the current stream or destination were closed before the M:System.IO.Stream.CopyTo(System.IO.Stream) method was called. |
T:System.IO.IOException | An I/O error occurred. |
void System.IO.Stream.CopyTo | ( | Stream | destination, |
int | bufferSize | ||
) |
Reads the bytes from the current stream and writes them to another stream, using a specified buffer size.
destination | The stream to which the contents of the current stream will be copied. |
bufferSize | The size of the buffer. This value must be greater than zero. The default size is 81920. |
T:System.ArgumentNullException | destination is null . |
T:System.ArgumentOutOfRangeException | bufferSize is negative or zero. |
T:System.NotSupportedException | The current stream does not support reading.-or- destination does not support writing. |
T:System.ObjectDisposedException | Either the current stream or destination were closed before the M:System.IO.Stream.CopyTo(System.IO.Stream) method was called. |
T:System.IO.IOException | An I/O error occurred. |
Asynchronously reads the bytes from the current stream and writes them to another stream.
destination | The stream to which the contents of the current stream will be copied. |
T:System.ArgumentNullException | destination is null . |
T:System.ObjectDisposedException | Either the current stream or the destination stream is disposed. |
T:System.NotSupportedException | The current stream does not support reading, or the destination stream does not support writing. |
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size.
destination | The stream to which the contents of the current stream will be copied. |
bufferSize | The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920. |
T:System.ArgumentNullException | destination is null . |
T:System.ArgumentOutOfRangeException | buffersize is negative or zero. |
T:System.ObjectDisposedException | Either the current stream or the destination stream is disposed. |
T:System.NotSupportedException | The current stream does not support reading, or the destination stream does not support writing. |
|
virtual |
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token.
destination | The stream to which the contents of the current stream will be copied. |
bufferSize | The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920. |
cancellationToken | The token to monitor for cancellation requests. The default value is P:System.Threading.CancellationToken.None. |
T:System.ArgumentNullException | destination is null . |
T:System.ArgumentOutOfRangeException | buffersize is negative or zero. |
T:System.ObjectDisposedException | Either the current stream or the destination stream is disposed. |
T:System.NotSupportedException | The current stream does not support reading, or the destination stream does not support writing. |
Reimplemented in System.IO.MemoryStream.
|
protectedvirtual |
void System.IO.Stream.Dispose | ( | ) |
Releases all resources used by the T:System.IO.Stream.
Implements System.IDisposable.
|
protectedvirtual |
Releases the unmanaged resources used by the T:System.IO.Stream and optionally releases the managed resources.
disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Reimplemented in System.IO.FileStream, System.IO.Pipes.PipeStream, System.Net.Security.NegotiateStream, System.Security.Cryptography.CryptoStream, System.Net.Security.SslStream, System.IO.Compression.DeflateStream, System.Net.Sockets.NetworkStream, System.IO.UnmanagedMemoryStream, System.IO.Compression.GZipStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.IO.MemoryStream, System.IO.BufferedStream, System.IO.Pipes.AnonymousPipeServerStream, System.Net.Security.AuthenticatedStream, and System.IO.MemoryMappedFiles.MemoryMappedViewStream.
|
virtual |
Waits for the pending asynchronous read to complete. (Consider using M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)
asyncResult | The reference to the pending asynchronous request to finish. |
T:System.ArgumentNullException | asyncResult is null . |
T:System.ArgumentException | A handle to the pending read operation is not available.-or-The pending operation does not support reading. |
T:System.InvalidOperationException | asyncResult did not originate from a M:System.IO.Stream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object) method on the current stream. |
T:System.IO.IOException | The stream is closed or an internal error has occurred. |
Reimplemented in System.IO.FileStream, System.Net.Security.NegotiateStream, System.Net.Security.SslStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.Net.Sockets.NetworkStream, System.IO.Pipes.PipeStream, System.IO.BufferedStream, System.IO.Compression.DeflateStream, and System.IO.Compression.GZipStream.
|
virtual |
Ends an asynchronous write operation. (Consider using M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)
asyncResult | A reference to the outstanding asynchronous I/O request. |
T:System.ArgumentNullException | asyncResult is null . |
T:System.ArgumentException | A handle to the pending write operation is not available.-or-The pending operation does not support writing. |
T:System.InvalidOperationException | asyncResult did not originate from a M:System.IO.Stream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object) method on the current stream. |
T:System.IO.IOException | The stream is closed or an internal error has occurred. |
Reimplemented in System.IO.FileStream, System.IO.BufferedStream, System.Net.Security.NegotiateStream, System.Net.Security.SslStream, System.IO.Pipes.PipeStream, System.IO.Compression.DeflateStream, System.Net.Sockets.NetworkStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, and System.IO.Compression.GZipStream.
|
pure virtual |
When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
T:System.IO.IOException | An I/O error occurs. |
Implemented in System.IO.FileStream, System.IO.Pipes.PipeStream, System.Net.Sockets.NetworkStream, System.Net.Security.NegotiateStream, System.Net.Security.SslStream, System.IO.UnmanagedMemoryStream, System.IO.MemoryStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.IO.Compression.DeflateStream, System.IO.BufferedStream, System.IO.Compression.GZipStream, System.Security.Cryptography.CryptoStream, and System.IO.MemoryMappedFiles.MemoryMappedViewStream.
Task System.IO.Stream.FlushAsync | ( | ) |
|
virtual |
Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.
cancellationToken | The token to monitor for cancellation requests. The default value is P:System.Threading.CancellationToken.None. |
T:System.ObjectDisposedException | The stream has been disposed. |
Reimplemented in System.IO.FileStream, System.Net.Sockets.NetworkStream, System.IO.UnmanagedMemoryStream, System.IO.MemoryStream, System.IO.BufferedStream, and System.Security.Cryptography.CryptoStream.
|
protectedvirtual |
|
pure virtual |
When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
buffer | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. |
offset | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
count | The maximum number of bytes to be read from the current stream. |
T:System.ArgumentException | The sum of offset and count is larger than the buffer length. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | offset or count is negative. |
T:System.IO.IOException | An I/O error occurs. |
T:System.NotSupportedException | The stream does not support reading. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
Implemented in System.IO.FileStream, System.Net.Security.NegotiateStream, System.Net.Security.SslStream, System.IO.MemoryStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.IO.UnmanagedMemoryStream, System.IO.Pipes.PipeStream, System.IO.BufferedStream, System.Net.Sockets.NetworkStream, System.IO.Compression.DeflateStream, System.IO.Compression.GZipStream, and System.Security.Cryptography.CryptoStream.
Task<int> System.IO.Stream.ReadAsync | ( | byte [] | buffer, |
int | offset, | ||
int | count | ||
) |
Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
buffer | The buffer to write the data into. |
offset | The byte offset in buffer at which to begin writing data from the stream. |
count | The maximum number of bytes to read. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | offset or count is negative. |
T:System.ArgumentException | The sum of offset and count is larger than the buffer length. |
T:System.NotSupportedException | The stream does not support reading. |
T:System.ObjectDisposedException | The stream has been disposed. |
T:System.InvalidOperationException | The stream is currently in use by a previous read operation. |
|
virtual |
Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.
buffer | The buffer to write the data into. |
offset | The byte offset in buffer at which to begin writing data from the stream. |
count | The maximum number of bytes to read. |
cancellationToken | The token to monitor for cancellation requests. The default value is P:System.Threading.CancellationToken.None. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | offset or count is negative. |
T:System.ArgumentException | The sum of offset and count is larger than the buffer length. |
T:System.NotSupportedException | The stream does not support reading. |
T:System.ObjectDisposedException | The stream has been disposed. |
T:System.InvalidOperationException | The stream is currently in use by a previous read operation. |
Reimplemented in System.IO.FileStream, System.IO.BufferedStream, System.IO.MemoryStream, System.IO.UnmanagedMemoryStream, and System.Security.Cryptography.CryptoStream.
|
virtual |
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Int32
, or -1 if at the end of the stream.T:System.NotSupportedException | The stream does not support reading. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
Reimplemented in System.IO.FileStream, System.IO.Pipes.PipeStream, System.IO.BufferedStream, System.IO.MemoryStream, System.IO.UnmanagedMemoryStream, and System.IO.IsolatedStorage.IsolatedStorageFileStream.
|
pure virtual |
When overridden in a derived class, sets the position within the current stream.
offset | A byte offset relative to the origin parameter. |
origin | A value of type T:System.IO.SeekOrigin indicating the reference point used to obtain the new position. |
T:System.IO.IOException | An I/O error occurs. |
T:System.NotSupportedException | The stream does not support seeking, such as if the stream is constructed from a pipe or console output. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
Implemented in System.IO.FileStream, System.IO.BufferedStream, System.IO.Pipes.PipeStream, System.Net.Security.NegotiateStream, System.IO.MemoryStream, System.Net.Security.SslStream, System.IO.UnmanagedMemoryStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.IO.Compression.DeflateStream, System.Net.Sockets.NetworkStream, System.Security.Cryptography.CryptoStream, and System.IO.Compression.GZipStream.
|
pure virtual |
When overridden in a derived class, sets the length of the current stream.
value | The desired length of the current stream in bytes. |
T:System.IO.IOException | An I/O error occurs. |
T:System.NotSupportedException | The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
Implemented in System.IO.BufferedStream, System.IO.FileStream, System.IO.Pipes.PipeStream, System.Net.Sockets.NetworkStream, System.IO.MemoryStream, System.Net.Security.NegotiateStream, System.IO.UnmanagedMemoryStream, System.Net.Security.SslStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.IO.Compression.DeflateStream, System.Security.Cryptography.CryptoStream, System.IO.Compression.GZipStream, and System.IO.MemoryMappedFiles.MemoryMappedViewStream.
Creates a thread-safe (synchronized) wrapper around the specified T:System.IO.Stream object.
stream | The T:System.IO.Stream object to synchronize. |
T:System.ArgumentNullException | stream is null . |
|
pure virtual |
When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
buffer | An array of bytes. This method copies count bytes from buffer to the current stream. |
offset | The zero-based byte offset in buffer at which to begin copying bytes to the current stream. |
count | The number of bytes to be written to the current stream. |
T:System.ArgumentException | The sum of offset and count is greater than the buffer length. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | offset or count is negative. |
T:System.IO.IOException | An I/O error occured, such as the specified file cannot be found. |
T:System.NotSupportedException | The stream does not support writing. |
T:System.ObjectDisposedException | M:System.IO.Stream.Write(System.Byte[],System.Int32,System.Int32) was called after the stream was closed. |
Implemented in System.IO.FileStream, System.IO.MemoryStream, System.Net.Security.NegotiateStream, System.IO.BufferedStream, System.Net.Security.SslStream, System.IO.UnmanagedMemoryStream, System.IO.Pipes.PipeStream, System.IO.IsolatedStorage.IsolatedStorageFileStream, System.IO.Compression.DeflateStream, System.Security.Cryptography.CryptoStream, System.Net.Sockets.NetworkStream, and System.IO.Compression.GZipStream.
Task System.IO.Stream.WriteAsync | ( | byte [] | buffer, |
int | offset, | ||
int | count | ||
) |
Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
buffer | The buffer to write data from. |
offset | The zero-based byte offset in buffer from which to begin copying bytes to the stream. |
count | The maximum number of bytes to write. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | offset or count is negative. |
T:System.ArgumentException | The sum of offset and count is larger than the buffer length. |
T:System.NotSupportedException | The stream does not support writing. |
T:System.ObjectDisposedException | The stream has been disposed. |
T:System.InvalidOperationException | The stream is currently in use by a previous write operation. |
|
virtual |
Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.
buffer | The buffer to write data from. |
offset | The zero-based byte offset in buffer from which to begin copying bytes to the stream. |
count | The maximum number of bytes to write. |
cancellationToken | The token to monitor for cancellation requests. The default value is P:System.Threading.CancellationToken.None. |
T:System.ArgumentNullException | buffer is null . |
T:System.ArgumentOutOfRangeException | offset or count is negative. |
T:System.ArgumentException | The sum of offset and count is larger than the buffer length. |
T:System.NotSupportedException | The stream does not support writing. |
T:System.ObjectDisposedException | The stream has been disposed. |
T:System.InvalidOperationException | The stream is currently in use by a previous write operation. |
Reimplemented in System.IO.FileStream, System.IO.BufferedStream, System.IO.MemoryStream, System.IO.UnmanagedMemoryStream, and System.Security.Cryptography.CryptoStream.
|
virtual |
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
value | The byte to write to the stream. |
T:System.IO.IOException | An I/O error occurs. |
T:System.NotSupportedException | The stream does not support writing, or the stream is already closed. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
Reimplemented in System.IO.FileStream, System.IO.BufferedStream, System.IO.MemoryStream, System.IO.Pipes.PipeStream, System.IO.UnmanagedMemoryStream, and System.IO.IsolatedStorage.IsolatedStorageFileStream.
|
static |
|
get |
|
get |
|
get |
|
get |
|
get |
When overridden in a derived class, gets the length in bytes of the stream.
T:System.NotSupportedException | A class derived from Stream does not support seeking. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
|
getset |
When overridden in a derived class, gets or sets the position within the current stream.
T:System.IO.IOException | An I/O error occurs. |
T:System.NotSupportedException | The stream does not support seeking. |
T:System.ObjectDisposedException | Methods were called after the stream was closed. |
|
getset |
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
T:System.InvalidOperationException | The P:System.IO.Stream.ReadTimeout method always throws an T:System.InvalidOperationException. |
|
getset |
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.
T:System.InvalidOperationException | The P:System.IO.Stream.WriteTimeout method always throws an T:System.InvalidOperationException. |