blob: 7f2db03a1dc0b3d21773b9bdfb2384a0b878b22f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package de.measite.minidns.record;
import java.io.DataInputStream;
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;
}
|