diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/measite/minidns/record/Data.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/de/measite/minidns/record/Data.java b/src/main/java/de/measite/minidns/record/Data.java index 9cb80374..7f2db03a 100644 --- a/src/main/java/de/measite/minidns/record/Data.java +++ b/src/main/java/de/measite/minidns/record/Data.java @@ -5,12 +5,30 @@ import java.io.IOException; import de.measite.minidns.Record.TYPE; +/** + * Generic payload class. + */ public interface Data { + /** + * The payload type. + * @return The payload type. + */ TYPE getType(); + /** + * Binary representation of this payload. + * @return The binary representation of this payload. + */ byte[] toByteArray(); + /** + * Parse this payload. + * @param dis The input stream. + * @param data The plain data (needed for name cross references). + * @param length The payload length. + * @throws IOException on io error (read past paket boundary). + */ void parse(DataInputStream dis, byte data[], int length) throws IOException; } |