-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDNSObject.java
More file actions
32 lines (29 loc) · 863 Bytes
/
DNSObject.java
File metadata and controls
32 lines (29 loc) · 863 Bytes
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
/**
* A DNSObject is any object representing a part of the DNS protocol
* and implementing the ability to be serialized (translated into an
* array of bytes) and produce values for various parts.
*
* @author Chris Blades
* @version 12/9/2009
*/
public interface DNSObject {
/**
* Serialize should translate the DNSObject into an array of bytes
* as per the DNS protocol.
*
* @return a byte array representing this DNSObject
*/
public byte[] serialize();
/**
* Should return a description of the state of this DNSObject in the
* format [label][value]
* @return descriptions of the state of this DNSObject
*/
public Map stateValues();
/**
* Return's the length of this DNSObject once serialized.
*
* @return the length of this DNSObject
*/
public int getLength();
}