private static Record
newRecord(Name name, int type, int dclass, long ttl, int length, DNSInput in)
throws IOException
{
	Record rec;
	rec = getEmptyRecord(name, type, dclass, ttl, in != null);
	if (in != null) {
		if (in.remaining() < length)
			throw new WireParseException("truncated record");
		in.setActive(length);

		rec.rrFromWire(in);

		if (in.remaining() > 0)
			throw new WireParseException("invalid record length");
		in.clearActive();
	}
	return rec;
}
Converts the type-specific RR to wire format - must be overriden
src/main/java/core/org/xbill/DNS/Record.java