| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | URIUtil.CoderDeprecated. 
 use org.apache.commons.codec.net.URLCodec | 
| Constructor and Description | 
|---|
| URIUtil() | 
| Modifier and Type | Method and Description | 
|---|---|
| static String | decode(String escaped)Unescape and decode a given string regarded as an escaped string with the
 default protocol charset. | 
| static String | decode(String escaped,
      String charset)Unescape and decode a given string regarded as an escaped string. | 
| static String | encode(String unescaped,
      BitSet allowed)Escape and encode a given string with allowed characters not to be
 escaped and the default protocol charset. | 
| static String | encode(String unescaped,
      BitSet allowed,
      String charset)Escape and encode a given string with allowed characters not to be
 escaped and a given charset. | 
| static String | encodeAll(String unescaped)Get the all escaped and encoded string with the default protocl charset. | 
| static String | encodeAll(String unescaped,
         String charset)Get the all escaped and encoded string with a given charset. | 
| static String | encodePath(String unescaped)Escape and encode a string regarded as the path component of an URI with
 the default protocol charset. | 
| static String | encodePath(String unescaped,
          String charset)Escape and encode a string regarded as the path component of an URI with
 a given charset. | 
| static String | encodePathQuery(String unescaped)Escape and encode a string regarded as the path and query components of
 an URI with the default protocol charset. | 
| static String | encodePathQuery(String unescaped,
               String charset)Escape and encode a string regarded as the path and query components of
 an URI with a given charset. | 
| static String | encodeQuery(String unescaped)Escape and encode a string regarded as the query component of an URI with
 the default protocol charset. | 
| static String | encodeQuery(String unescaped,
           String charset)Escape and encode a string regarded as the query component of an URI with
 a given charset. | 
| static String | encodeWithinAuthority(String unescaped)Escape and encode a string regarded as within the authority component of
 an URI with the default protocol charset. | 
| static String | encodeWithinAuthority(String unescaped,
                     String charset)Escape and encode a string regarded as within the authority component of
 an URI with a given charset. | 
| static String | encodeWithinPath(String unescaped)Escape and encode a string regarded as within the path component of an
 URI with the default protocol charset. | 
| static String | encodeWithinPath(String unescaped,
                String charset)Escape and encode a string regarded as within the path component of an
 URI with a given charset. | 
| static String | encodeWithinQuery(String unescaped)Escape and encode a string regarded as within the query component of an
 URI with the default protocol charset. | 
| static String | encodeWithinQuery(String unescaped,
                 String charset)Escape and encode a string regarded as within the query component of an
 URI with a given charset. | 
| static String | getFromPath(String uri)Get the path of an URI and its rest part. | 
| static String | getName(String uri)Get the basename of an URI. | 
| static String | getPath(String uri)Get the path of an URI. | 
| static String | getPathQuery(String uri)Get the path and query of an URI. | 
| static String | getQuery(String uri)Get the query of an URI. | 
protected static final BitSet empty
public static String getName(String uri)
uri - a string regarded an URIpublic static String getQuery(String uri)
uri - a string regarded an URInull if empty or undefinedpublic static String getPath(String uri)
uri - a string regarded an URIpublic static String getPathQuery(String uri)
uri - a string regarded an URIpublic static String getFromPath(String uri)
uri - a string regarded an URIpublic static String encodeAll(String unescaped) throws URIException
encode(String unescaped, Bitset
 empty, URI.getDefaultProtocolCharset()).unescaped - an unescaped stringURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset(), 
encode(java.lang.String, java.util.BitSet)public static String encodeAll(String unescaped, String charset) throws URIException
encode(String unescaped, Bitset
 empty, String charset).unescaped - an unescaped stringcharset - the charsetURIException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encodeWithinAuthority(String unescaped) throws URIException
unescaped - an unescaped stringURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset(), 
encode(java.lang.String, java.util.BitSet)public static String encodeWithinAuthority(String unescaped, String charset) throws URIException
unescaped - an unescaped stringcharset - the charsetURIException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encodePathQuery(String unescaped) throws URIException
unescaped - an unescaped stringURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset(), 
encode(java.lang.String, java.util.BitSet)public static String encodePathQuery(String unescaped, String charset) throws URIException
unescaped - an unescaped stringcharset - the charsetURIException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encodeWithinPath(String unescaped) throws URIException
unescaped - an unescaped stringURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset(), 
encode(java.lang.String, java.util.BitSet)public static String encodeWithinPath(String unescaped, String charset) throws URIException
unescaped - an unescaped stringcharset - the charsetURIException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encodePath(String unescaped) throws URIException
unescaped - an unescaped stringURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset(), 
encode(java.lang.String, java.util.BitSet)public static String encodePath(String unescaped, String charset) throws URIException
unescaped - an unescaped stringcharset - the charsetURIException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encodeWithinQuery(String unescaped) throws URIException
unescaped - an unescaped stringURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset(), 
encode(java.lang.String, java.util.BitSet)public static String encodeWithinQuery(String unescaped, String charset) throws URIException
unescaped - an unescaped stringcharset - the charsetURIException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encodeQuery(String unescaped) throws URIException
unescaped - an unescaped stringURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset(), 
encode(java.lang.String, java.util.BitSet)public static String encodeQuery(String unescaped, String charset) throws URIException
unescaped - an unescaped stringcharset - the charsetURIException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encode(String unescaped, BitSet allowed) throws URIException
unescaped - a stringallowed - allowed characters not to be escapedURIException - if the default protocol charset is not supportedURI.getDefaultProtocolCharset()public static String encode(String unescaped, BitSet allowed, String charset) throws URIException
unescaped - a stringallowed - allowed characters not to be escapedcharset - the charsetURIExceptionpublic static String decode(String escaped) throws URIException
escaped - a stringURIException - if the string cannot be decoded (invalid)URI.getDefaultProtocolCharset()public static String decode(String escaped, String charset) throws URIException
escaped - a stringcharset - the charsetURIException - if the charset is not supportedURIUtil.Coder.decode(char[], java.lang.String)Copyright © 2019. All Rights Reserved.