public class BinaryTableValue

Summary

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

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.

Property Summary

Flags Type Name Summary
public byte[] Bytes (rw)

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

Constructor Summary

Flags Name Summary
public BinaryTableValue(byte[] bytes)

Constructs an instance with the passed-in value for its Bytes property.

public BinaryTableValue()

Constructs an instance with null for its Bytes property.

Property Detail

public byte[] Bytes (rw)

Summary

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

Constructor Detail

BinaryTableValue

public BinaryTableValue(byte[] bytes)

Parameters
Name Type
bytes byte[]

Summary

Constructs an instance with the passed-in value for its Bytes property.

BinaryTableValue

public BinaryTableValue()

Summary

Constructs an instance with null for its Bytes property.