All Implemented Interfaces:
CharSequence, Comparable<DnsLabel>
Direct Known Subclasses:
ALabel, FakeALabel

public abstract class XnLabelextends ReservedLdhLabel
A label that begins with "xn--" and follows the LDH rule.
  • Constructor Details

    • XnLabel

      protected XnLabel(String label)
      Stores the label in its ACE punycode form as a reserved LDH label.
      Parameters:
      label - the reserved LDH label, already in its internal ACE (punycode) form
  • Method Details

    • fromInternal

      protected static LdhLabel fromInternal(String label)
      Create an LdhLabel from an internal (ACE) representation.
      Parameters:
      label - the ACE label
      Returns:
      an ALabel, or a FakeALabel if the label decodes to itself
    • isXnLabel

      public static boolean isXnLabel(String label)
      Check if a label is an XN label.
      Parameters:
      label - the label to check
      Returns:
      true if the label is an XN label
    • isXnLabelInternal

      static boolean isXnLabelInternal(String label)
      Check if a label is an XN label internally.
      Parameters:
      label - the label to check
      Returns:
      true if the label is an XN label