Here you can find the source of urlDecodeBytes(String key)
public static byte[] urlDecodeBytes(String key)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] urlDecodeBytes(String key) { byte[] bs = new byte[key.length() / 2]; for (int i = 0; i < key.length() / 2; i++) { bs[i] = (byte) (((int) unHex(key.substring(i * 2, i * 2 + 2))) - 128); }/*from w w w . j av a 2 s. c om*/ return bs; } public static char unHex(String str) { return (char) Integer.parseInt(str, 16); } }