these will become extension methods once we move to .NET 3.5
More...
|
static bool | IsEntirelyNull (byte[] buffer) |
| Checks if the entire byte array is filled with null values.
|
|
static string | DescribeAsHex (byte[] buffer, string separator, int bytesPerLine) |
| Converts the input byte array to a hexadecimal string with the specified separator and bytes per line.
|
|
static string | DecodeAsString (byte[] buffer, int offset, int length, Encoding encoding) |
| Decodes a portion of a byte array into a string using the specified encoding and returns the result.
|
|
static byte[] | Concat (params byte[][] byteArrays) |
| Concatenates multiple byte arrays into a single byte array and returns the result.
|
|
these will become extension methods once we move to .NET 3.5
◆ Concat()
static byte[] NAudio.Utils.ByteArrayExtensions.Concat |
( |
params byte | byteArrays[][] | ) |
|
|
inlinestatic |
Concatenates multiple byte arrays into a single byte array and returns the result.
- Parameters
-
byteArrays | The byte arrays to be concatenated. |
- Returns
- A byte array containing the concatenated elements of byteArrays .
This method calculates the total size required for the concatenated byte array by summing the lengths of all input byte arrays. It then creates a new byte array of the calculated size and copies the elements of each input byte array into the new array. The resulting byte array is returned as the concatenation of all input byte arrays. If the total size is less than or equal to 0, an empty byte array is returned.
◆ DecodeAsString()
static string NAudio.Utils.ByteArrayExtensions.DecodeAsString |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | length, |
|
|
Encoding | encoding ) |
|
inlinestatic |
Decodes a portion of a byte array into a string using the specified encoding and returns the result.
- Parameters
-
buffer | The input byte array. |
offset | The zero-based byte offset in buffer at which to begin decoding. |
length | The number of bytes to decode. |
encoding | The character encoding to use. |
- Returns
- A string that contains the results of decoding the specified sequence of bytes.
This method decodes a portion of the input byte array buffer into a string using the specified character encoding encoding . It starts at the specified byte offset and decodes the specified length number of bytes. If a null byte is encountered within the specified length, the decoding stops at that position.
◆ DescribeAsHex()
static string NAudio.Utils.ByteArrayExtensions.DescribeAsHex |
( |
byte[] | buffer, |
|
|
string | separator, |
|
|
int | bytesPerLine ) |
|
inlinestatic |
Converts the input byte array to a hexadecimal string with the specified separator and bytes per line.
- Parameters
-
buffer | The byte array to be converted to hexadecimal string. |
separator | The separator to be used between hexadecimal values. |
bytesPerLine | The number of bytes to be displayed per line in the output. |
- Returns
- A string representing the hexadecimal values of the input byte array with the specified separator and line formatting.
◆ IsEntirelyNull()
static bool NAudio.Utils.ByteArrayExtensions.IsEntirelyNull |
( |
byte[] | buffer | ) |
|
|
inlinestatic |
Checks if the entire byte array is filled with null values.
- Parameters
-
buffer | The byte array to be checked. |
- Returns
- True if the entire byte array is filled with null values; otherwise, false.
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Core/Utils/ByteArrayExtensions.cs