Package org.minidns.record
Class Data
java.lang.Object
org.minidns.record.Data
- Direct Known Subclasses:
DelegatingDnssecRR
,DNSKEY
,InternetAddressRR
,MX
,NSEC
,NSEC3
,NSEC3PARAM
,OPENPGPKEY
,OPT
,RRSIG
,RRWithTarget
,SOA
,SRV
,TLSA
,TXT
,UNKNOWN
public abstract class Data extends Object
Generic payload class.
-
Constructor Summary
Constructors Constructor Description Data()
-
Method Summary
Modifier and Type Method Description boolean
equals(Object other)
abstract Record.TYPE
getType()
The payload type.int
hashCode()
int
length()
protected abstract void
serialize(DataOutputStream dos)
The internal method used to serialize Data subclasses.byte[]
toByteArray()
void
toOutputStream(DataOutputStream dos)
Write the binary representation of this payload to the givenDataOutputStream
.void
toOutputStream(OutputStream outputStream)
-
Constructor Details
-
Data
public Data()
-
-
Method Details
-
getType
The payload type.- Returns:
- The payload type.
-
serialize
The internal method used to serialize Data subclasses.- Parameters:
dos
- the output stream to serialize to.- Throws:
IOException
- if an I/O error occurs.
-
length
public final int length() -
toOutputStream
- Throws:
IOException
-
toOutputStream
Write the binary representation of this payload to the givenDataOutputStream
.- Parameters:
dos
- the DataOutputStream to write to.- Throws:
IOException
- if an I/O error occurs.
-
toByteArray
public final byte[] toByteArray() -
hashCode
public final int hashCode() -
equals
-