/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }
/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }
/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }
/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }
/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }
/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }
/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }
/** * Normalizes the path part of this URI. * * @return an URI object which represents this instance with a normalized * path. */ public URI normalize() { if (opaque) { return this; } String normalizedPath = normalize(path, false); // if the path is already normalized, return this if (path.equals(normalizedPath)) { return this; } // get an exact copy of the URI re-calculate the scheme specific part // since the path of the normalized URI is different from this URI. URI result = duplicate(); result.path = normalizedPath; result.setSchemeSpecificPart(); return result; }