ServiceRecordParserParse(Byte, Int32, Int32) Method

Parses an array of bytes into its contained ServiceRecord.

Definition

Namespace: InTheHand.Net.Bluetooth.Sdp
Assembly: InTheHand.Net.Bluetooth (in InTheHand.Net.Bluetooth.dll) Version: 4.0.32+5cdf1cfd21064ea31c5de33d160200ca1c4bc218
C#
public ServiceRecord Parse(
	byte[] buffer,
	int offset,
	int length
)

Parameters

buffer  Byte
A byte array containing a Service Record.
offset  Int32
The position in the data buffer at which to begin parsing the Service Record.
length  Int32
The length of the Service Record in the byte array.

Return Value

ServiceRecord
The Service Record parse from the byte array.

Remarks

If the record contains any element type not supported by the parser it will throw NotImplementedException. The only element types defined by SDP in v2.0 that are not currently implemented are 64- and 128-bit integers. Of course any types defined in a later version will also throw this. This behaviour can be changed with the SkipUnhandledElementTypes property.

Exceptions

ProtocolViolationException The record contains invalid content.
NotImplementedException The record contains an element type not supported by the parser.

See Also

Reference

Parse(Byte)
CreateServiceRecordFromBytes(Byte)