Here you can find the source of toDecodedString(URI uri)
Parameter | Description |
---|---|
uri | The URI to return in string form |
public static String toDecodedString(URI uri)
//package com.java2s; /******************************************************************************* * Copyright (c) 2005, 2009 IBM Corporation and others. * 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 * // ww w . j a v a 2s . c o m * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ import java.net.URI; public class Main { /** * Returns a string representation of the URI in a form suitable for human consumption. * * <p> * The string returned by this method is equivalent to that returned by the * {@link URI#toString()} method except that all sequences of escaped octets are decoded. * </p> * * @param uri The URI to return in string form * @return the string form of the URI * @since org.eclipse.core.filesystem 1.2 */ public static String toDecodedString(URI uri) { String scheme = uri.getScheme(); String part = uri.getSchemeSpecificPart(); if (scheme == null) return part; return scheme + ':' + part; } }