Java URL Decode decode(String content)

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

Description

decode

License

Apache License

Declaration

public static String decode(String content) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

public class Main {
    public static String decode(String content) {
        try {/*from  w ww.  j a v a  2 s.c  om*/
            String decodeContent = URLDecoder.decode(content, "utf-8");

            return decodeContent;
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

        return content;
    }
}

Related

  1. decode( Map source, String encoding)
  2. decode(final String content, final String encoding)
  3. decode(final String s, final String enc)
  4. decode(final String string)
  5. decode(Object value)
  6. decode(String encoded)
  7. decode(String encodeMsg)
  8. decode(String input)
  9. decode(String input)