diff options
author | Rene Treffer <treffer@measite.de> | 2014-06-22 15:29:51 +0200 |
---|---|---|
committer | Rene Treffer <treffer@measite.de> | 2014-06-22 15:29:51 +0200 |
commit | 0e484dd17f85d923891460ff606b13294e8985ba (patch) | |
tree | 01b3835385c9338aec7fb9bdaf5361a25d8b5568 /src/main/java/de/measite/minidns/record/Data.java | |
parent | 028700efe0345e764f598378cb64c5e57f980e33 (diff) |
Add missing javadoc and review new code
Diffstat (limited to 'src/main/java/de/measite/minidns/record/Data.java')
-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; } |