@Override
    protected void rrFromWire(DNSInput in) throws IOException {
        svcPriority = in.readU16();
        targetName = new Name(in);
        svcParams.clear();
        while (in.remaining() >= 4) {
            int key = in.readU16();
            int length = in.readU16();
            byte[] value = in.readByteArray(length);
            ParameterBase param;
            Supplier<ParameterBase> factory = parameters.getFactory(key);
            if (factory != null) {
                param = factory.get();
            } else {
                param = new ParameterUnknown(key);
            }
            param.fromWire(value);
            svcParams.put(key, param);
        }
        if (in.remaining() > 0) {
            throw new WireParseException("Record had unexpected number of bytes");
        }
        if (!checkMandatoryParams()) {
            throw new WireParseException("Not all mandatory SvcParams are specified");
        }
    }
Implements common functionality for SVCB and HTTPS records
src/main/java/core/org/xbill/DNS/SVCBBase.java