Here you can find the source of unescape(String string)
public static String unescape(String string)
//package com.java2s; public class Main { private static final byte[] val = { 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 63, 63, 63, 63, 63, 63, 63, 10, 11, 12, 13, 14, 15, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 10, 11, 12, 13, 14, 15, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 };//w ww . j av a2 s . c om public static String unescape(String string) { StringBuffer stringbuffer = new StringBuffer(); int i = 0; for (int i_2_ = string.length(); i < i_2_; i++) { char c = string.charAt(i); if ('A' <= c && c <= 'Z') stringbuffer.append((char) c); else if ('a' <= c && c <= 'z') stringbuffer.append((char) c); else if ('0' <= c && c <= '9') stringbuffer.append((char) c); else if (c == '-' || c == '_' || c == '.' || c == '!' || c == '~' || c == '*' || c == '\'' || c == '(' || c == ')') stringbuffer.append((char) c); else if (c == '%') { int i_3_ = 0; if ('u' != string.charAt(i + 1)) { i_3_ = i_3_ << 4 | val[string.charAt(i + 1)]; i_3_ = i_3_ << 4 | val[string.charAt(i + 2)]; i += 2; } else { i_3_ = i_3_ << 4 | val[string.charAt(i + 2)]; i_3_ = i_3_ << 4 | val[string.charAt(i + 3)]; i_3_ = i_3_ << 4 | val[string.charAt(i + 4)]; i_3_ = i_3_ << 4 | val[string.charAt(i + 5)]; i += 5; } stringbuffer.append((char) i_3_); } else stringbuffer.append((char) c); } return stringbuffer.toString(); } }