Interface URLComponent

All Superinterfaces:
Serializable
All Known Subinterfaces:
Protocol
All Known Implementing Classes:
Anchor, Host, Label, Parameters, ParametersElement, ParsedParameters, Path, PathElement, Port, Protocols, URL

public interface URLComponent extends Serializable
One element of a URL, such as a Host, Port, Password, Path, PathElement, Parameters or ParametersElement.
Author:
Tim Boudreau
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Append this component to a StringBuilder.
    Get a human-readable, localized name for this part of the URL.
    boolean
    Determine if this component is in compliance with the RFCs governing URLs and DNS.
  • Method Details

    • isValid

      boolean isValid()
      Determine if this component is in compliance with the RFCs governing URLs and DNS.
      Returns:
      True if this component is valid.
    • getComponentName

      String getComponentName()
      Get a human-readable, localized name for this part of the URL. Useful if an error message needs to be shown.
      Returns:
      The component name
    • appendTo

      void appendTo(StringBuilder sb)
      Append this component to a StringBuilder.
      Parameters:
      sb - A StringBuilder