@Override
public void onSuccess(ChannelFuture future) throws Exception {
future.channel().pipeline().addLast(new SimpleChannelInboundHandler<DnsResponse>() {
@Override
protected void channelRead0(ChannelHandlerContext ctx, DnsResponse msg) throws Exception {
DnsResponseCode code = DnsResponseCode.valueOf(msg.getHeader().getResponseCode());
if (code == DnsResponseCode.NOERROR) {
List<DnsResource> resources = msg.getAnswers();
List<Object> records = new ArrayList<>(resources.size());
for (DnsResource resource : msg.getAnswers()) {