Class ByteArrayExtensions
these will become extension methods once we move to .NET 3.5
public static class ByteArrayExtensions
- Inheritance
-
ByteArrayExtensions
- Inherited Members
Methods
Concat(params byte[][])
Concatenates the given arrays into a single array.
public static byte[] Concat(params byte[][] byteArrays)
Parameters
byteArrays
byte[][]The arrays to concatenate
Returns
- byte[]
The concatenated resulting array.
DecodeAsString(byte[], int, int, Encoding)
Decodes the buffer using the specified encoding, stopping at the first null
public static string DecodeAsString(byte[] buffer, int offset, int length, Encoding encoding)
Parameters
Returns
DescribeAsHex(byte[], string, int)
Converts to a string containing the buffer described in hex
public static string DescribeAsHex(byte[] buffer, string separator, int bytesPerLine)
Parameters
Returns
IsEntirelyNull(byte[])
Checks if the buffer passed in is entirely full of nulls
public static bool IsEntirelyNull(byte[] buffer)
Parameters
buffer
byte[]