org.influxdb.msgpack.MessagePackResponseBodyConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of influxdb-java Show documentation
Show all versions of influxdb-java Show documentation
Java API to access the InfluxDB REST API
The 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