(Name name, int type, int dclass, long ttl, int length, DNSInput in)
| 75 | rrFromWire(DNSInput in) throws IOException; |
| 76 | |
| 77 | private static Record |
| 78 | newRecord(Name name, int type, int dclass, long ttl, int length, DNSInput in) |
| 79 | throws IOException |
| 80 | { |
| 81 | Record rec; |
| 82 | rec = getEmptyRecord(name, type, dclass, ttl, in != null); |
| 83 | if (in != null) { |
| 84 | if (in.remaining() < length) |
| 85 | throw new WireParseException("truncated record"); |
| 86 | in.setActive(length); |
| 87 | |
| 88 | rec.rrFromWire(in); |
| 89 | |
| 90 | if (in.remaining() > 0) |
| 91 | throw new WireParseException("invalid record length"); |
| 92 | in.clearActive(); |
| 93 | } |
| 94 | return rec; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Creates a new record, with the given parameters. |
no test coverage detected