Table of Contents

Class BinaryTableValue

Namespace
RabbitMQ.Client
Assembly
RabbitMQ.Client.dll

Wrapper for a byte[]. May appear as values read from and written to AMQP field tables.

public class BinaryTableValue
Inheritance
BinaryTableValue
Inherited Members

Remarks

The sole reason for the existence of this class is to permit encoding of byte[] as 'x' in AMQP field tables, an extension to the specification that is part of the tentative JMS mapping implemented by QPid.

Instances of this object may be found as values held in IDictionary instances returned from RabbitMQ.Client.Impl.WireFormatting.ReadTable, e.g. as part of IBasicProperties.Headers tables. Likewise, instances may be set as values in an IDictionary table to be encoded by RabbitMQ.Client.Impl.WireFormatting.WriteTable.

When an instance of this class is encoded/decoded, the type tag 'x' is used in the on-the-wire representation. The AMQP standard type tag 'S' is decoded to a raw byte[], and a raw byte[] is encoded as 'S'. Instances of System.String are converted to a UTF-8 binary representation, and then encoded using tag 'S'. In order to force the use of tag 'x', instances of this class must be used.

Constructors

BinaryTableValue()

Creates a new instance of the BinaryTableValue with an empty array for its Bytes property.

public BinaryTableValue()

BinaryTableValue(byte[])

Creates a new instance of the BinaryTableValue.

public BinaryTableValue(byte[] bytes)

Parameters

bytes byte[]

The wrapped byte array, as decoded or as to be encoded.

Properties

Bytes

The wrapped byte array, as decoded or as to be encoded.

public byte[] Bytes { get; set; }

Property Value

byte[]