Java URL Decode decode(final String content, final String encoding)

Here you can find the source of decode(final String content, final String encoding)

Description

decode

License

Open Source License

Declaration

private static String decode(final String content, final String encoding) 

Method Source Code


//package com.java2s;
import java.io.UnsupportedEncodingException;

import java.net.URLDecoder;

public class Main {
    private static String decode(final String content, final String encoding) {
        try {//from ww w  . ja v a 2 s  . c om
            return URLDecoder.decode(content, encoding != null ? encoding : "UTF-8");
        } catch (UnsupportedEncodingException problem) {
            throw new IllegalArgumentException(problem);
        }
    }
}

Related

  1. addParam(Map properties, String strParams, boolean bDecodeString)
  2. decode( Map source, String encoding)
  3. decode(final String s, final String enc)
  4. decode(final String string)
  5. decode(Object value)
  6. decode(String content)