All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.influxdb.msgpack.MessagePackResponseBodyConverter Maven / Gradle / Ivy

There is a newer version: 2.24
Show newest version
package org.influxdb.msgpack;

import java.io.IOException;
import java.io.InputStream;

import org.influxdb.dto.QueryResult;
import okhttp3.ResponseBody;
import retrofit2.Converter;

/**
 * Test the InfluxDB API over MessagePack format.
 *
 * @author hoan.le [at] bonitoo.io
 *
 */
public class MessagePackResponseBodyConverter implements Converter {

  @Override
  public QueryResult convert(final ResponseBody value) throws IOException {
      try (InputStream is = value.byteStream()) {
        MessagePackTraverser traverser = new MessagePackTraverser();
        return traverser.parse(is);
      }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy