Java URL Decode urlDecodeBytes(String key)

Here you can find the source of urlDecodeBytes(String key)

Description

url Decode Bytes

License

Apache License

Declaration

public static byte[] urlDecodeBytes(String key) 

Method Source Code

//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);
    }
}

Related

  1. urlDecode(String scope)
  2. URLDecode(String str)
  3. urldecode(String str)
  4. urlDecode(String str)
  5. urlDecode(String text)
  6. urlDecodeFilename(char[] input)
  7. urlDecodeInplace(StringBuilder input)
  8. urlDecoder(String encoded)
  9. xmlDecode(String s)