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

Method equals

src/main/java/core/org/xbill/DNS/Name.java:770–786  ·  view source on GitHub ↗
(byte [] b, int bpos)

Source from the content-addressed store, hash-verified

768}
769
770private final boolean
771equals(byte [] b, int bpos) {
772 int labels = labels();
773 for (int i = 0, pos = offset(0); i < labels; i++) {
774 if (name[pos] != b[bpos])
775 return false;
776 int len = name[pos++];
777 bpos++;
778 if (len > MAXLABEL)
779 throw new IllegalStateException("invalid label");
780 for (int j = 0; j < len; j++)
781 if (lowercase[(name[pos++] & 0xFF)] !=
782 lowercase[(b[bpos++] & 0xFF)])
783 return false;
784 }
785 return true;
786}
787
788/**
789 * Are these two Names equivalent?

Callers 6

maybeAddRecordMethod · 0.95
subdomainMethod · 0.95
_nextRecordMethod · 0.95
addMessageMethod · 0.95
NameMethod · 0.45
fromStringMethod · 0.45

Calls 3

labelsMethod · 0.95
offsetMethod · 0.95
hashCodeMethod · 0.95

Tested by

no test coverage detected