From 70d403f0b612f6cb26b8fc194e35c622c5383167 Mon Sep 17 00:00:00 2001 From: Rene Treffer Date: Wed, 23 Jul 2014 21:53:38 +0200 Subject: [PATCH] Better / more verbose toString --- src/main/java/de/measite/minidns/DNSMessage.java | 5 ++++- src/main/java/de/measite/minidns/Question.java | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/measite/minidns/DNSMessage.java b/src/main/java/de/measite/minidns/DNSMessage.java index 01c096450..ab2535ce1 100644 --- a/src/main/java/de/measite/minidns/DNSMessage.java +++ b/src/main/java/de/measite/minidns/DNSMessage.java @@ -515,7 +515,10 @@ public class DNSMessage { public String toString() { return "-- DNSMessage " + id + " --\n" + - Arrays.toString(answers); + "Q" + Arrays.toString(questions) + + "NS" + Arrays.toString(nameserverRecords) + + "A" + Arrays.toString(answers) + + "ARR" + Arrays.toString(additionalResourceRecords); } } diff --git a/src/main/java/de/measite/minidns/Question.java b/src/main/java/de/measite/minidns/Question.java index 628622510..883003561 100644 --- a/src/main/java/de/measite/minidns/Question.java +++ b/src/main/java/de/measite/minidns/Question.java @@ -134,4 +134,9 @@ public class Question { byte o[] = ((Question)other).toByteArray(); return Arrays.equals(t, o); } + + @Override + public String toString() { + return "Question/" + clazz + "/" + type + ": " + name; + } }