public class BasicMessageReader

Known direct subtypes: BytesMessageReader, MapMessageReader, StreamMessageReader

Summary

Framework for analyzing various types of AMQP Basic-class application messages.

Property Summary

Flags Type Name Summary
public virtual final byte[] BodyBytes (rw)

Retrieve the message body, as a byte array.

public virtual final Stream BodyStream (r)

Retrieve the being used to read from the message body.

public virtual final IDictionary<string,object> Headers (r)

Retrieves the content header properties of the message being read. Is of type .

public IBasicProperties Properties (rw)

Retrieve the associated with this instance.

public NetworkBinaryReader Reader (r)

Retrieve this instance's NetworkBinaryReader reading from .

Constructor Summary

Flags Name Summary
public BasicMessageReader(IBasicProperties properties, byte[] body)

Construct an instance ready for reading.

Method Summary

Flags Name Summary
public virtual final int RawRead()

Read a single byte from the body stream, without encoding or interpretation. Returns -1 for end-of-stream.

public virtual final int RawRead(byte[] target, int offset, int length)

Read bytes from the body stream into a section of an existing byte array, without encoding or interpretation. Returns the number of bytes read from the body and written into the target array, which may be less than the number requested if the end-of-stream is reached.

Property Detail

public virtual final byte[] BodyBytes (rw)

Summary

Retrieve the message body, as a byte array.

public virtual final Stream BodyStream (r)

Summary

Retrieve the being used to read from the message body.

public virtual final IDictionary<string,object> Headers (r)

Summary

Retrieves the content header properties of the message being read. Is of type .

public IBasicProperties Properties (rw)

Summary

Retrieve the associated with this instance.

public NetworkBinaryReader Reader (r)

Summary

Retrieve this instance's NetworkBinaryReader reading from .

Remarks

If no NetworkBinaryReader instance exists, one is created, pointing at the beginning of the body. If one already exists, the existing instance is returned. The instance is not reset.

Constructor Detail

BasicMessageReader

public BasicMessageReader(IBasicProperties properties, byte[] body)

Parameters
Name Type
properties IBasicProperties
body byte[]

Summary

Construct an instance ready for reading.

Method Detail

RawRead

public virtual final int RawRead()

Flags public virtual final
Return type int

Summary

Read a single byte from the body stream, without encoding or interpretation. Returns -1 for end-of-stream.

RawRead

public virtual final int RawRead(byte[] target, int offset, int length)

Flags public virtual final
Return type int
Parameters
Name Type
target byte[]
offset int
length int

Summary

Read bytes from the body stream into a section of an existing byte array, without encoding or interpretation. Returns the number of bytes read from the body and written into the target array, which may be less than the number requested if the end-of-stream is reached.