/** * Unescape and decode a given string. * * @param escapedComponent an being-unescaped component * @param charset the charset to decode * @return the escaped and encoded string * * @throws URIException if the charset is not supported * * @deprecated use org.apache.commons.codec.net.URLCodec */ public static String decode(char[] escapedComponent, String charset) throws URIException { return URI.decode(escapedComponent, charset); }
/** * Get the query. * * @return the query string. * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #decode */ public String getQuery() throws URIException { return (_query == null) ? null : decode(_query, getProtocolCharset()); }
/** * Get the userinfo. * * @return the userinfo * @throws URIException If {@link #decode} fails * @see #getAuthority */ public String getUserinfo() throws URIException { return (_userinfo == null) ? null : decode(_userinfo, getProtocolCharset()); }
/** * Get the fragment. * * @return the fragment string * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #decode */ public String getFragment() throws URIException { return (_fragment == null) ? null : decode(_fragment, getProtocolCharset()); }
/** * It can be gotten the URI character sequence. * * @return the original URI string * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #decode */ public String getURI() throws URIException { return (_uri == null) ? null : decode(_uri, getProtocolCharset()); }
/** * Get the authority. * * @return the authority * @throws URIException If {@link #decode} fails */ public String getAuthority() throws URIException { return (_authority == null) ? null : decode(_authority, getProtocolCharset()); }
throw new IllegalArgumentException("Component array of chars may not be null"); return decode(new String(component), charset);
/** * Get the host. * <p><blockquote><pre> * host = hostname | IPv4address | IPv6reference * </pre></blockquote><p> * * @return the host * @throws URIException If {@link #decode} fails * @see #getAuthority */ public String getHost() throws URIException { if (_host != null) { return decode(_host, getProtocolCharset()); } else { return null; } }
/** * Get the level above the this hierarchy level. * * @return the above hierarchy level * @throws URIException If {@link #getRawCurrentHierPath(char[])} fails. * @see #decode */ public String getAboveHierPath() throws URIException { char[] path = getRawAboveHierPath(); return (path == null) ? null : decode(path, getProtocolCharset()); }
/** * Get the current hierarchy level. * * @return the current hierarchy level * @throws URIException If {@link #getRawCurrentHierPath(char[])} fails. * @see #decode */ public String getCurrentHierPath() throws URIException { char[] path = getRawCurrentHierPath(); return (path == null) ? null : decode(path, getProtocolCharset()); }
/** * Get the original URI reference string. * * @return the original URI reference string * @throws URIException If {@link #decode} fails. */ public String getURIReference() throws URIException { char[] uriReference = getRawURIReference(); return (uriReference == null) ? null : decode(uriReference, getProtocolCharset()); }
/** * Get the path. * <p><blockquote><pre> * path = [ abs_path | opaque_part ] * </pre></blockquote><p> * @return the path string * @throws URIException If {@link #decode} fails. * @see #decode */ public String getPath() throws URIException { char[] path = getRawPath(); return (path == null) ? null : decode(path, getProtocolCharset()); }
/** * Get the path and query. * * @return the path and query string. * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #decode */ public String getPathQuery() throws URIException { char[] rawPathQuery = getRawPathQuery(); return (rawPathQuery == null) ? null : decode(rawPathQuery, getProtocolCharset()); }
/** * Get the basename of the path. * * @return the basename string * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #decode */ public String getName() throws URIException { char[] basename = getRawName(); return (basename == null) ? null : decode(getRawName(), getProtocolCharset()); }
/** * Get the query. * * @return the query string. * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #decode */ public String getQuery() throws URIException { return (_query == null) ? null : decode(_query, getProtocolCharset()); }
/** * Get the fragment. * * @return the fragment string * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #decode */ public String getFragment() throws URIException { return (_fragment == null) ? null : decode(_fragment, getProtocolCharset()); }
/** * Get the userinfo. * * @return the userinfo * @throws URIException If {@link #decode} fails * @see #getAuthority */ public String getUserinfo() throws URIException { return (_userinfo == null) ? null : decode(_userinfo, getProtocolCharset()); }
/** * Get the current hierarchy level. * * @return the current hierarchy level * @throws URIException If {@link #getRawCurrentHierPath(char[])} fails. * @see #decode */ public String getCurrentHierPath() throws URIException { char[] path = getRawCurrentHierPath(); return (path == null) ? null : decode(path, getProtocolCharset()); }
/** * Get the original URI reference string. * * @return the original URI reference string * @throws URIException If {@link #decode} fails. */ public String getURIReference() throws URIException { char[] uriReference = getRawURIReference(); return (uriReference == null) ? null : decode(uriReference, getProtocolCharset()); }
/** * Get the level above the this hierarchy level. * * @return the above hierarchy level * @throws URIException If {@link #getRawCurrentHierPath(char[])} fails. * @see #decode */ public String getAboveHierPath() throws URIException { char[] path = getRawAboveHierPath(); return (path == null) ? null : decode(path, getProtocolCharset()); }