Java Utililty Methods URL Create

List of utility methods to do URL Create

Description

The list of methods to do URL Create are organized into topic(s).

Method

StringtoUrlSafe(String timeZoneId)
to Url Safe
return timeZoneId.replace('/', '!');
StringtoURLString(byte[] hash)
to URL String
StringBuilder out = new StringBuilder(hash.length * 2);
for (int i = 0; i < hash.length; i++) {
    if (isAscii(hash[i])) {
        out.append((char) hash[i]);
    } else {
        out.append('%').append(HEX[(hash[i] & 0xF0) >>> 4 & 0x0F]).append(HEX[hash[i] & 0x0F]);
return out.toString();
StringtoURLString(String s)
to URL String
if (s == null) {
    return s;
StringBuffer buf = new StringBuffer();
for (int i = 0; i < s.length(); i++) {
    char ch = s.charAt(i);
    switch (ch) {
    case '%':
...