Package org.minidns.dnslabel
Class DnsLabel
java.lang.Object
org.minidns.dnslabel.DnsLabel
- All Implemented Interfaces:
CharSequence,Comparable<DnsLabel>
- Direct Known Subclasses:
LdhLabel,NonLdhLabel
A DNS label is an individual component of a DNS name. Labels are usually shown separated by dots.
This class implements Comparable which compares DNS labels according to the Canonical DNS Name Order as
specified in RFC 4034 § 6.1.
Note that as per RFC 2181 § 11 DNS labels may contain any byte.
- Author:
- Florian Schmaus
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal DnsLabelfinal charcharAt(int index) final intfinal booleanstatic DnsLabelstatic DnsLabel[]final Stringprotected Stringfinal Stringfinal inthashCode()static booleanisIdnAcePrefixed(String string) final intlength()final CharSequencesubSequence(int start, int end) final StringtoString()final voidwriteToBoas(ByteArrayOutputStream byteArrayOutputStream) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
MAX_LABEL_LENGTH_IN_OCTETS
public static final int MAX_LABEL_LENGTH_IN_OCTETSThe maximum length of a DNS label in octets.- See Also:
-
WILDCARD_LABEL
-
VALIDATE
public static boolean VALIDATEWhether or not the DNS label is validated on construction. -
label
-
-
Constructor Details
-
DnsLabel
-
-
Method Details
-
getInternationalizedRepresentation
-
getInternationalizedRepresentationInternal
-
getLabelType
-
length
public final int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public final char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
equals
-
hashCode
public final int hashCode() -
asLowercaseVariant
-
writeToBoas
-
compareTo
- Specified by:
compareToin interfaceComparable<DnsLabel>
-
from
-
from
-
isIdnAcePrefixed
-