Méthode | Description | |
---|---|---|
Close ( ) : void |
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.
|
|
CopyToAsync ( [ destination, int bufferSize, |
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token.
|
|
CreateObjRef ( |
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
|
|
Equals ( object obj ) : bool |
Determines whether the specified System.Object, is equal to this instance.
|
|
Flush ( ) : void |
When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
|
|
FlushAsync ( |
Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.
|
|
GetHashCode ( ) : int |
Returns a hash code for this instance.
|
|
InitializeLifetimeService ( ) : object |
Obtains a lifetime service object to control the lifetime policy for this instance.
|
|
PeekByte ( ) : int |
Reads a byte from the stream without advancing the position within the stream, or returns -1 if at the end of the stream.
|
|
PeekableStream ( [ baseStream ) : System |
Initializes a new instance of the PeekableStream class.
|
|
Read ( byte buffer, int offset, int count ) : int |
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.
|
|
ReadAsync ( [ buffer, int offset, int count, |
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.
|
|
ReadByte ( ) : int |
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.
|
|
Seek ( long offset, SeekOrigin origin ) : long |
When overridden in a derived class, sets the position within the current stream.
|
|
SetLength ( long value ) : void |
When overridden in a derived class, sets the length of the current stream.
|
|
ToString ( ) : string |
Returns a System.String that represents this instance.
|
|
Write ( byte buffer, int offset, int count ) : void |
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.
|
|
WriteAsync ( byte buffer, int offset, int count, |
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.
|
|
WriteByte ( byte value ) : void |
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
|
Méthode | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the T:System.IO.Stream and optionally releases the managed resources.
|
public CopyToAsync ( [ destination, int bufferSize, |
||
destination | [ | The stream to which the contents of the current stream will be copied. |
bufferSize | int | 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 |
|
Résultat | Task |
public CreateObjRef ( |
||
requestedType | The |
|
Résultat |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Résultat | void |
public Equals ( object obj ) : bool | ||
obj | object | The |
Résultat | bool |
public FlushAsync ( |
||
cancellationToken | The token to monitor for cancellation requests. The default value is |
|
Résultat | Task |
public InitializeLifetimeService ( ) : object | ||
Résultat | object |
public PeekableStream ( [ baseStream ) : System | ||
baseStream | [ | The base stream. |
Résultat | System |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between |
offset | int | The zero-based byte offset in |
count | int | The maximum number of bytes to be read from the current stream. |
Résultat | int |
public ReadAsync ( [ buffer, int offset, int count, |
||
buffer | [ | The buffer to write the data into. |
offset | int | The byte offset in |
count | int | The maximum number of bytes to read. |
cancellationToken | The token to monitor for cancellation requests. The default value is |
|
Résultat | Task |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | A byte offset relative to the |
origin | SeekOrigin | A value of type |
Résultat | long |
public SetLength ( long value ) : void | ||
value | long | The desired length of the current stream in bytes. |
Résultat | void |
public Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | An array of bytes. This method copies |
offset | int | The zero-based byte offset in |
count | int | The number of bytes to be written to the current stream. |
Résultat | void |
public WriteAsync ( byte buffer, int offset, int count, |
||
buffer | byte | The buffer to write data from. |
offset | int | The zero-based byte offset in |
count | int | The maximum number of bytes to write. |
cancellationToken | The token to monitor for cancellation requests. The default value is |
|
Résultat | Task |
public WriteByte ( byte value ) : void | ||
value | byte | The byte to write to the stream. |
Résultat | void |