Example usage for org.apache.commons.httpclient URI allowed_within_path

List of usage examples for org.apache.commons.httpclient URI allowed_within_path

Introduction

In this page you can find the example usage for org.apache.commons.httpclient URI allowed_within_path.

Prototype

BitSet allowed_within_path

To view the source code for org.apache.commons.httpclient URI allowed_within_path.

Click Source Link

Document

Those characters that are allowed within the path.

Usage

From source file:be.jcdo.mp3searchengines.tools.URIUtils.java

/**
 * Escape and encode a string regarded as within the path component of an
 * URI with a given charset./*  www . ja v a 2  s.  co  m*/
 * The path may consist of a sequence of path segments separated by a
 * single slash "/" character.  Within a path segment, the characters
 * "/", ";", "=", and "?" are reserved.
 *
 * @param unescaped an unescaped string
 * @param charset the charset
 * @return the escaped string
 * 
 * @throws URIException if the charset is not supported
 * 
 * @see #encode
 */
public static String encodeWithinPath(String unescaped, String charset) throws URIException {

    return encode(unescaped, URI.allowed_within_path, charset);
}