Méthode | Description | |
---|---|---|
Copy ( |
Copy all bytes from an input stream into an output stream until the end of the input stream is reached. Note. .NET 4 introduced CopyTo() methods to the stream base class that makes this method unnecessary. |
|
Copy ( |
Copy all bytes from an input stream into an output stream until the end of the input stream is reached. Note. .NET 4 introduced CopyTo() methods to the stream base class that makes this method unnecessary. |
|
Read ( |
Reads data from a stream into a provided array. Reads up to the length of array and returns the number of bytes read. Unlike Stream.Read(), this method guarantees to read bytes until the end of stream is reached. |
|
ReadFill ( |
Reads data from a stream into a provided array, filling the array. If the end of the stream is reached before the array is filled then an EndOfStreamException is thrown. Unlike Stream.Read(), this method guarantees to fill the byte array if the stream has sufficient bytes. |
|
ReadToByteArray ( |
Read stream into byte array. Reads until the end of stream is reached and returns entire stream contents as a new byte array.
|
public static Copy ( |
||
inputStream | The input stream to read bytes from. | |
outputStream | The output stream to write bytes into. | |
Résultat | void |
public static Copy ( |
||
inputStream | The input stream to read bytes from. | |
outputStream | The output stream to write bytes into. | |
buffer | byte | A pre-allocated byte buffer. |
Résultat | void |
public static Read ( |
||
stream | The stream to read data from. | |
data | byte | The array to read bytes into. |
Résultat | int |
public static ReadFill ( |
||
stream | The stream to read data from. | |
data | byte | The array to read bytes into. |
Résultat | void |
public static ReadToByteArray ( |
||
stream | The stream to read data from. | |
Résultat | byte[] |