Java URI Decode decodeURI(java.net.URI uri)

Here you can find the source of decodeURI(java.net.URI uri)

Description

decode URI

License

Open Source License

Declaration

public static String decodeURI(java.net.URI uri) throws UnsupportedEncodingException 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2010 SAP AG./*  w w w.  java 2s.co m*/
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Emil Simeonov - initial API and implementation.
 *    Dimitar Donchev - initial API and implementation.
 *    Dimitar Tenev - initial API and implementation.
 *    Nevena Manova - initial API and implementation.
 *    Georgi Konstantinov - initial API and implementation.
 *******************************************************************************/

import java.io.UnsupportedEncodingException;

import java.net.URLDecoder;

public class Main {
    private static final String ENC = "UTF-8";

    public static String decodeURI(java.net.URI uri) throws UnsupportedEncodingException {
        return decodeURI(uri.toString());
    }

    public static String decodeURI(String locationUri) throws UnsupportedEncodingException {
        return URLDecoder.decode(locationUri, ENC);
    }
}

Related

  1. decode(String encodedURI)
  2. decode(String uri)
  3. decodeToUtf8(String uri)
  4. decodeUnreserved(URI address)
  5. decodeURI(CharSequence uriCharSequence, String charset)
  6. decodeURI(String s)
  7. decodeURI(String str, boolean fullUri)
  8. decodeUri(String string)
  9. decodeURI(String uri)