Package org.jsoup.helper
Class UrlBuilder
java.lang.Object
org.jsoup.helper.UrlBuilder
A utility class to normalize input URLs. jsoup internal; API subject to change.
Normalization includes puny-coding the host, and encoding non-ascii path components. Any non-ascii characters in the query string (or the fragment/anchor) are escaped, but any existing escapes in those components are preserved.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) StringBuilder
(package private) URL
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
private static void
appendToAscii
(String s, boolean spaceAsPlus, StringBuilder sb) (package private) URL
build()
private static String
decodePart
(String encoded) private static boolean
isHex
(char c)
-
Field Details
-
u
URL u -
q
-
unsafeCharacters
- See Also:
-
-
Constructor Details
-
UrlBuilder
UrlBuilder(URL inputUrl)
-
-
Method Details
-
build
URL build() -
appendKeyVal
- Throws:
UnsupportedEncodingException
-
decodePart
-
appendToAscii
private static void appendToAscii(String s, boolean spaceAsPlus, StringBuilder sb) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
isHex
private static boolean isHex(char c)
-