Better / more verbose toString

This commit is contained in:
Rene Treffer 2014-07-23 21:53:38 +02:00
parent b0f8bec1cb
commit 70d403f0b6
2 changed files with 9 additions and 1 deletions

View File

@ -515,7 +515,10 @@ public class DNSMessage {
public String toString() { public String toString() {
return "-- DNSMessage " + id + " --\n" + return "-- DNSMessage " + id + " --\n" +
Arrays.toString(answers); "Q" + Arrays.toString(questions) +
"NS" + Arrays.toString(nameserverRecords) +
"A" + Arrays.toString(answers) +
"ARR" + Arrays.toString(additionalResourceRecords);
} }
} }

View File

@ -134,4 +134,9 @@ public class Question {
byte o[] = ((Question)other).toByteArray(); byte o[] = ((Question)other).toByteArray();
return Arrays.equals(t, o); return Arrays.equals(t, o);
} }
@Override
public String toString() {
return "Question/" + clazz + "/" + type + ": " + name;
}
} }