Remove System.out code

This commit is contained in:
Rene Treffer 2014-07-30 22:37:09 +02:00
parent 64f25e1783
commit 858251d52c

View File

@ -3,6 +3,8 @@ package de.measite.minidns;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import de.measite.minidns.record.A; import de.measite.minidns.record.A;
import de.measite.minidns.record.AAAA; import de.measite.minidns.record.AAAA;
@ -19,6 +21,8 @@ import de.measite.minidns.util.NameUtil;
*/ */
public class Record { public class Record {
private static final Logger LOGGER = Logger.getLogger(Client.class.getName());
/** /**
* The record type. * The record type.
* @see <a href="http://www.iana.org/assignments/dns-parameters">IANA DNS Parameters</a> * @see <a href="http://www.iana.org/assignments/dns-parameters">IANA DNS Parameters</a>
@ -241,7 +245,7 @@ public class Record {
this.clazz = CLASS.getClass(clazzValue & 0x7fff); this.clazz = CLASS.getClass(clazzValue & 0x7fff);
this.unicastQuery = (clazzValue & 0x8000) > 0; this.unicastQuery = (clazzValue & 0x8000) > 0;
if (this.clazz == null) { if (this.clazz == null) {
System.out.println("Unknown class " + clazzValue); LOGGER.log(Level.FINE, "Unknown class " + clazzValue);
} }
this.ttl = (((long)dis.readUnsignedShort()) << 32) + this.ttl = (((long)dis.readUnsignedShort()) << 32) +
dis.readUnsignedShort(); dis.readUnsignedShort();
@ -269,7 +273,7 @@ public class Record {
this.payloadData = new TXT(); this.payloadData = new TXT();
break; break;
default: default:
System.out.println("Unparsed type " + type); LOGGER.log(Level.FINE, "Unparsed type " + type);
this.payloadData = null; this.payloadData = null;
for (int i = 0; i < payloadLength; i++) { for (int i = 0; i < payloadLength; i++) {
dis.readByte(); dis.readByte();