Example usage for com.rabbitmq.client.impl MethodArgumentReader MethodArgumentReader

List of usage examples for com.rabbitmq.client.impl MethodArgumentReader MethodArgumentReader

Introduction

In this page you can find the example usage for com.rabbitmq.client.impl MethodArgumentReader MethodArgumentReader.

Prototype

public MethodArgumentReader(ValueReader in) 

Source Link

Document

Construct a MethodArgumentReader from the given ValueReader .

Usage

From source file:uk.trainwatch.rabbitmq.RabbitMQ.java

License:Apache License

/**
 * Convert an AMQP table to a map/*from w w  w. j  a v  a2  s.co  m*/
 *
 * @param reply
 *
 * @return
 */
public static Map<String, Object> fromAMQPTable(byte[] reply) {
    try {
        return fixAMQPTable(
                new MethodArgumentReader(new ValueReader(new DataInputStream(new ByteArrayInputStream(reply))))
                        .readTable());
    } catch (IOException ex) {
        throw new UncheckedIOException(ex);
    }
}