use of org.apache.kafka.common.requests.ByteBufferChannel in project kafka by apache.
the class TestUtils method toBuffer.
public static ByteBuffer toBuffer(Send send) {
ByteBufferChannel channel = new ByteBufferChannel(send.size());
try {
assertEquals(send.size(), send.writeTo(channel));
channel.close();
return channel.buffer();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Aggregations