/** * Set the authority. It can be one type of server, hostport, hostname, * IPv4address, IPv6reference and reg_name. * Note that there is no setAuthority method by the escape encoding reason. * * @param escapedAuthority the escaped authority string * @throws URIException If {@link * #parseAuthority(java.lang.String,boolean)} fails */ public void setEscapedAuthority(String escapedAuthority) throws URIException { parseAuthority(escapedAuthority, true); setURI(); }
/** * Set the escaped query string. * * @param escapedQuery the escaped query string * @throws URIException escaped query not valid */ public void setEscapedQuery(String escapedQuery) throws URIException { if (escapedQuery == null) { _query = null; setURI(); return; } setRawQuery(escapedQuery.toCharArray()); }
/** * Set the escaped path. * * @param escapedPath the escaped path string * @throws URIException encoding error or not proper for initial instance * @see #encode */ public void setEscapedPath(String escapedPath) throws URIException { if (escapedPath == null) { _path = _opaque = null; setURI(); return; } setRawPath(escapedPath.toCharArray()); }
/** * Set the authority. It can be one type of server, hostport, hostname, * IPv4address, IPv6reference and reg_name. * <p><blockquote><pre> * authority = server | reg_name * </pre></blockquote><p> * * @param escapedAuthority the raw escaped authority * @throws URIException If {@link * #parseAuthority(java.lang.String,boolean)} fails * @throws NullPointerException null authority */ public void setRawAuthority(char[] escapedAuthority) throws URIException, NullPointerException { parseAuthority(new String(escapedAuthority), true); setURI(); }
/** * Set the raw-escaped query. * * @param escapedQuery the raw-escaped query * @throws URIException escaped query not valid */ public void setRawQuery(char[] escapedQuery) throws URIException { if (escapedQuery == null || escapedQuery.length == 0) { _query = escapedQuery; setURI(); return; } // remove the fragment identifier escapedQuery = removeFragmentIdentifier(escapedQuery); if (!validate(escapedQuery, query)) { throw new URIException(URIException.ESCAPING, "escaped query not valid"); } _query = escapedQuery; setURI(); }
/** * Normalizes the path part of this URI. Normalization is only meant to be performed on * URIs with an absolute path. Calling this method on a relative path URI will have no * effect. * * @throws URIException no more higher path level to be normalized * * @see #isAbsPath() */ public void normalize() throws URIException { if (isAbsPath()) { _path = normalize(_path); setURI(); } }
/** * 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())); }
/** * Set the authority. It can be one type of server, hostport, hostname, * IPv4address, IPv6reference and reg_name. * Note that there is no setAuthority method by the escape encoding reason. * * @param escapedAuthority the escaped authority string * @throws URIException If {@link * #parseAuthority(java.lang.String,boolean)} fails */ public void setEscapedAuthority(String escapedAuthority) throws URIException { parseAuthority(escapedAuthority, true); setURI(); }
/** * Set the escaped query string. * * @param escapedQuery the escaped query string * @throws URIException escaped query not valid */ public void setEscapedQuery(String escapedQuery) throws URIException { if (escapedQuery == null) { _query = null; setURI(); return; } setRawQuery(escapedQuery.toCharArray()); }
/** * Set the escaped query string. * * @param escapedQuery the escaped query string * @throws URIException escaped query not valid */ public void setEscapedQuery(String escapedQuery) throws URIException { if (escapedQuery == null) { _query = null; setURI(); return; } setRawQuery(escapedQuery.toCharArray()); }
/** * Set the authority. It can be one type of server, hostport, hostname, * IPv4address, IPv6reference and reg_name. * Note that there is no setAuthority method by the escape encoding reason. * * @param escapedAuthority the escaped authority string * @throws URIException If {@link * #parseAuthority(java.lang.String,boolean)} fails */ public void setEscapedAuthority(String escapedAuthority) throws URIException { parseAuthority(escapedAuthority, true); setURI(); }
/** * Set the authority. It can be one type of server, hostport, hostname, * IPv4address, IPv6reference and reg_name. * Note that there is no setAuthority method by the escape encoding reason. * * @param escapedAuthority the escaped authority string * @throws URIException If {@link * #parseAuthority(java.lang.String,boolean)} fails */ public void setEscapedAuthority(String escapedAuthority) throws URIException { parseAuthority(escapedAuthority, true); setURI(); }
/** * Set the escaped query string. * * @param escapedQuery the escaped query string * @throws URIException escaped query not valid */ public void setEscapedQuery(String escapedQuery) throws URIException { if (escapedQuery == null) { _query = null; setURI(); return; } setRawQuery(escapedQuery.toCharArray()); }
/** * Set the authority. It can be one type of server, hostport, hostname, * IPv4address, IPv6reference and reg_name. * Note that there is no setAuthority method by the escape encoding reason. * * @param escapedAuthority the escaped authority string * @throws URIException If {@link * #parseAuthority(java.lang.String,boolean)} fails */ public void setEscapedAuthority(String escapedAuthority) throws URIException { parseAuthority(escapedAuthority, true); setURI(); }
/** * Set the escaped query string. * * @param escapedQuery the escaped query string * @throws URIException escaped query not valid */ public void setEscapedQuery(String escapedQuery) throws URIException { if (escapedQuery == null) { _query = null; setURI(); return; } setRawQuery(escapedQuery.toCharArray()); }