Brecham.Obex — An OBEX library for the .NET Framework

ObexHeaderConverter.StringFromAsciiByteSeq Method (Byte[], Boolean)

Converts a Byte array containing ASCII encoded text, as carried in a byte sequence header type, back into a String. Also returning whether the supplied value was null-terminated.

[Visual Basic]
Overloads Public Shared Function StringFromAsciiByteSeq( _
   ByVal bytes As Byte(), _
   ByRef wasNullTerminated As Boolean _
) As String
[C#]
public static string StringFromAsciiByteSeq(
   byte[] bytes,
   out bool wasNullTerminated
);

Parameters

bytes
The received Byte array.
wasNullTerminated
On return, whether the ASCII encoded string in the Byte array was null-terminated.

Return Value

The String result.

Remarks

The conversion is a strict conversion where the platform supports DecoderFallback, i.e. not on CF or FXv1.1.

Exceptions

Exception Type Condition
EncoderFallbackException The content of the given byte sequence is not in ASCII format.

See Also

ObexHeaderConverter Class | Brecham.Obex Namespace | ObexHeaderConverter.StringFromAsciiByteSeq Overload List | StringAsAsciiByteSeq