private void
toWireCanonical(DNSOutput out, boolean noTTL) {
	name.toWireCanonical(out);
	out.writeU16(type);
	out.writeU16(dclass);
	if (noTTL) {
		out.writeU32(0);
	} else {
		out.writeU32(ttl);
	}
	int lengthPosition = out.current();
	out.writeU16(0); /* until we know better */
	rrToWire(out, null, true);
	int rrlength = out.current() - lengthPosition - 2;
	out.writeU16At(rrlength, lengthPosition);
}
Converts a Record into DNS uncompressed wire format.
src/main/java/core/org/xbill/DNS/Record.java