MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / wild

Method wild

src/main/java/core/org/xbill/DNS/Name.java:460–475  ·  view source on GitHub ↗

Generates a new Name with the first n labels replaced by a wildcard @return The wildcard name

(int n)

Source from the content-addressed store, hash-verified

458 * @return The wildcard name
459 */
460public Name
461wild(int n) {
462 if (n < 1)
463 throw new IllegalArgumentException("must replace 1 or more " +
464 "labels");
465 try {
466 Name newname = new Name();
467 copy(wild, newname);
468 newname.append(name, offset(n), getlabels() - n);
469 return newname;
470 }
471 catch (NameTooLongException e) {
472 throw new IllegalStateException
473 ("Name.wild: concatenate failed");
474 }
475}
476
477/**
478 * Returns a canonicalized version of the Name (all lowercase). This may be

Callers 2

digestRRsetMethod · 0.95
lookupMethod · 0.80

Calls 4

copyMethod · 0.95
appendMethod · 0.95
offsetMethod · 0.95
getlabelsMethod · 0.95

Tested by

no test coverage detected