Table of Contents

Class ByteArrayExtensions

Namespace
NAudio.Utils
Assembly
NAudio.Core.dll

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

buffer byte[]
offset int
length int
encoding Encoding

Returns

string

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

buffer byte[]
separator string
bytesPerLine int

Returns

string

IsEntirelyNull(byte[])

Checks if the buffer passed in is entirely full of nulls

public static bool IsEntirelyNull(byte[] buffer)

Parameters

buffer byte[]

Returns

bool