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

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

Introduction

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

Prototype

public ValueReader(DataInputStream in) 

Source Link

Document

Construct a MethodArgumentReader streaming over the given DataInputStream.

Usage

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

License:Apache License

/**
 * Convert an AMQP table to a map/*from www.  j a  v  a 2  s . com*/
 *
 * @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);
    }
}