/** * 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()); }
/** * Set the fragment. * * @param fragment the fragment string. * @throws URIException If an error occurs. */ public void setFragment(String fragment) throws URIException { if (fragment == null || fragment.length() == 0) { _fragment = (fragment == null) ? null : fragment.toCharArray(); hash = 0; return; } _fragment = encode(fragment, allowed_fragment, getProtocolCharset()); hash = 0; }
/** * 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()); }
/** * Set the query. * <p> * When a query string is not misunderstood the reserved special characters * ("&", "=", "+", ",", and "$") within a query component, it is * recommended to use in encoding the whole query with this method. * <p> * The additional APIs for the special purpose using by the reserved * special characters used in each protocol are implemented in each protocol * classes inherited from <code>URI</code>. So refer to the same-named APIs * implemented in each specific protocol instance. * * @param query the query string. * @throws URIException incomplete trailing escape pattern or unsupported * character encoding * @see #encode */ public void setQuery(String query) throws URIException { if (query == null || query.length() == 0) { _query = (query == null) ? null : query.toCharArray(); setURI(); return; } setRawQuery(encode(query, allowed_query, 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()); }
String charset = getProtocolCharset();
String charset = getProtocolCharset();
String charset = 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 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()); }