-
Notifications
You must be signed in to change notification settings - Fork 0
easyextensions StreamExtensions
BigMakCode edited this page Aug 5, 2024
·
1 revision
Stream extensions.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph EasyExtensions
EasyExtensions.StreamExtensions[[StreamExtensions]]
end
Returns | Name |
---|---|
byte``[] |
ReadToEnd (Stream stream)Reads the bytes from the current stream and writes them to the byte array. |
Task <byte``[] > |
ReadToEndAsync (Stream stream)Asynchronously reads the bytes from the current stream and writes them to the byte array. |
string |
SHA512 (Stream stream)Calculate SHA512 hash of byte stream. |
Stream extensions.
public static byte ReadToEnd(Stream stream)
Type | Name | Description |
---|---|---|
Stream |
stream |
Reads the bytes from the current stream and writes them to the byte array.
Received byte array.
Name | Description |
---|---|
IOException | An I/O error occurred. |
ArgumentNullException | Destination is null. |
ObjectDisposedException | Either the current stream or the destination stream is disposed. |
NotSupportedException | The current stream does not support reading, or the destination stream does not support writing. |
public static async Task<byte> ReadToEndAsync(Stream stream)
Type | Name | Description |
---|---|---|
Stream |
stream |
Asynchronously reads the bytes from the current stream and writes them to the byte array.
Received byte array.
Name | Description |
---|---|
ArgumentNullException | Destination is null. |
ObjectDisposedException | Either the current stream or the destination stream is disposed. |
NotSupportedException | The current stream does not support reading, or the destination stream does not support writing. |
public static string SHA512(Stream stream)
Type | Name | Description |
---|---|---|
Stream |
stream | Data to calculate hash. |
Calculate SHA512 hash of byte stream.
SHA512 hash of byte stream.
Generated with ModularDoc