Package org.xbill.DNS
Class EDNSOption
java.lang.Object
org.xbill.DNS.EDNSOption
- Direct Known Subclasses:
ClientSubnetOption,CookieOption,DnssecAlgorithmOption,ExtendedErrorCodeOption,GenericEDNSOption,TcpKeepaliveOption
DNS extension options, as described in RFC 6891. The rdata of an OPT record is defined as a list
of options; this represents a single option.
- Author:
- Brian Wellington, Ming Zhou <mizhou@bnivideo.com>, Beaumaris Networks
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if two EDNS Options are identical.static EDNSOptionfromWire(byte[] b) Converts the wire format of an EDNS Option (including code and length) into the type-specific format.intgetCode()Returns the EDNS Option's code.inthashCode()Generates a hash code based on the EDNS Option's data.toString()byte[]toWire()Converts an EDNS Option (including code and length) into wire format.
-
Constructor Details
-
EDNSOption
public EDNSOption(int code) Creates an option with the given option code and data.
-
-
Method Details
-
toString
-
getCode
public int getCode()Returns the EDNS Option's code.- Returns:
- the option code
-
fromWire
Converts the wire format of an EDNS Option (including code and length) into the type-specific format.- Returns:
- The option, in wire format.
- Throws:
IOException
-
toWire
public byte[] toWire()Converts an EDNS Option (including code and length) into wire format.- Returns:
- The option, in wire format.
-
equals
Determines if two EDNS Options are identical. -
hashCode
public int hashCode()Generates a hash code based on the EDNS Option's data.
-