public final class URLUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
domainToASCII(String domain)
Converts a domain to its ASCII representation.
|
static String |
domainToUnicode(String asciiDomain)
Converts a domain to its Unicode representation.
|
static String |
getDefaultPortForScheme(String scheme)
Gets the default port for a given schema.
|
static int |
hexToInt(char c1,
char c2) |
static boolean |
isASCIIAlpha(int c) |
static boolean |
isASCIIAlphaLowercase(int c) |
static boolean |
isASCIIAlphanumeric(int c) |
static boolean |
isASCIIAlphaUppercase(int c) |
static boolean |
isASCIIDigit(int c) |
static boolean |
isASCIIHexDigit(int c) |
static boolean |
isRelativeScheme(String scheme)
Returns true if the schema is a known relative schema
(ftp, file, gopher, http, https, ws, wss).
|
static boolean |
isURLCodePoint(int c) |
static String |
percentDecode(String input)
Percent-decodes a string.
|
static void |
percentEncode(byte b,
StringBuilder buffer) |
public static final Charset UTF_8
public static String percentDecode(String input)
input
- public static String domainToASCII(String domain) throws GalimatiasParseException
domain
- GalimatiasParseException
public static String domainToUnicode(String asciiDomain) throws GalimatiasParseException
asciiDomain
- GalimatiasParseException
public static boolean isASCIIHexDigit(int c)
public static boolean isASCIIDigit(int c)
public static boolean isASCIIAlphaUppercase(int c)
public static boolean isASCIIAlphaLowercase(int c)
public static boolean isASCIIAlpha(int c)
public static boolean isASCIIAlphanumeric(int c)
public static boolean isURLCodePoint(int c)
public static int hexToInt(char c1, char c2)
public static void percentEncode(byte b, StringBuilder buffer)
public static boolean isRelativeScheme(String scheme)
scheme
- Copyright © 2013–2014. All rights reserved.