@Override
    protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception {
        final ByteBuf frame = (ByteBuf) super.decode(ctx, in);
        if (frame == null) {
            return null;
        }

        try {
            return DnsMessageUtil.decodeDnsQuery(decoder, frame.slice(), new DnsMessageUtil.DnsQueryFactory() {
                @Override
                public DnsQuery newQuery(int id, DnsOpCode dnsOpCode) {
                    return new DefaultDnsQuery(id, dnsOpCode);
                }
            });
        } finally {
            frame.release();
        }
    }
Creates a new decoder with the specified {@code decoder}.
core/src/test/java/com/linecorp/armeria/client/endpoint/dns/TcpDnsQueryDecoder.java