Package com.mastfrog.url
Interface URLComponent
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
Protocol
- All Known Implementing Classes:
Anchor,Host,Label,Parameters,ParametersElement,ParsedParameters,Path,PathElement,Port,Protocols,URL
One element of a URL, such as a Host, Port, Password, Path, PathElement,
Parameters or ParametersElement.
- Author:
- Tim Boudreau
-
Method Summary
Modifier and TypeMethodDescriptionvoidAppend this component to a StringBuilder.Get a human-readable, localized name for this part of the URL.booleanisValid()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
Append this component to a StringBuilder.- Parameters:
sb- A StringBuilder
-