aboutsummaryrefslogtreecommitdiff
path: root/src/org/xbill/DNS/UNKRecord.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/xbill/DNS/UNKRecord.java')
-rw-r--r--src/org/xbill/DNS/UNKRecord.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/org/xbill/DNS/UNKRecord.java b/src/org/xbill/DNS/UNKRecord.java
new file mode 100644
index 0000000..91c9697
--- /dev/null
+++ b/src/org/xbill/DNS/UNKRecord.java
@@ -0,0 +1,54 @@
+// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)
+
+package org.xbill.DNS;
+
+import java.io.*;
+
+/**
+ * A class implementing Records of unknown and/or unimplemented types. This
+ * class can only be initialized using static Record initializers.
+ *
+ * @author Brian Wellington
+ */
+
+public class UNKRecord extends Record {
+
+private static final long serialVersionUID = -4193583311594626915L;
+
+private byte [] data;
+
+UNKRecord() {}
+
+Record
+getObject() {
+ return new UNKRecord();
+}
+
+void
+rrFromWire(DNSInput in) throws IOException {
+ data = in.readByteArray();
+}
+
+void
+rdataFromString(Tokenizer st, Name origin) throws IOException {
+ throw st.exception("invalid unknown RR encoding");
+}
+
+/** Converts this Record to the String "unknown format" */
+String
+rrToString() {
+ return unknownToString(data);
+}
+
+/** Returns the contents of this record. */
+public byte []
+getData() {
+ return data;
+}
+
+void
+rrToWire(DNSOutput out, Compression c, boolean canonical) {
+ out.writeByteArray(data);
+}
+
+}