blob: 36b369c61de886f3954cdbb24709f4f36aa4156d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Oct 21 11:03:14 GMT+01:00 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
URIUtils (HttpComponents Client 4.2.2 API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.http.client.utils.URIUtils class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="URIUtils (HttpComponents Client 4.2.2 API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/URIUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/http/client/utils/URIBuilder.html" title="class in org.apache.http.client.utils"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/http/client/utils/URLEncodedUtils.html" title="class in org.apache.http.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/http/client/utils/URIUtils.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="URIUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.http.client.utils</FONT>
<BR>
Class URIUtils</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.http.client.utils.URIUtils</B>
</PRE>
<HR>
<DL>
<DT><PRE><FONT SIZE="-1"><A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/annotation/Immutable.html" title="class or interface in org.apache.http.annotation">@Immutable</A>
</FONT>public class <B>URIUtils</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
A collection of utilities for <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URIs</CODE></A>, to workaround
bugs within the class or for ease-of-use features.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>4.0</DD>
</DL>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#createURI(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)">createURI</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;scheme,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host,
int&nbsp;port,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;path,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;query,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;fragment)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../org/apache/http/client/utils/URIBuilder.html" title="class in org.apache.http.client.utils"><CODE>URIBuilder</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpHost.html" title="class or interface in org.apache.http">HttpHost</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#extractHost(java.net.URI)">extractHost</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts target host from the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URI</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#resolve(java.net.URI, java.lang.String)">resolve</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;baseURI,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;reference)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolves a URI reference against a base URI.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#resolve(java.net.URI, java.net.URI)">resolve</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;baseURI,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;reference)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resolves a URI reference against a base URI.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#rewriteURI(java.net.URI)">rewriteURI</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A convenience method that creates a new <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URI</CODE></A> whose scheme, host, port, path,
query are taken from the existing URI, dropping any fragment or user-information.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#rewriteURI(java.net.URI, org.apache.http.HttpHost)">rewriteURI</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri,
<A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpHost.html" title="class or interface in org.apache.http">HttpHost</A>&nbsp;target)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A convenience method for
<A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#rewriteURI(java.net.URI, org.apache.http.HttpHost, boolean)"><CODE>rewriteURI(URI, HttpHost, boolean)</CODE></A> that always keeps the
fragment.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#rewriteURI(java.net.URI, org.apache.http.HttpHost, boolean)">rewriteURI</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri,
<A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpHost.html" title="class or interface in org.apache.http">HttpHost</A>&nbsp;target,
boolean&nbsp;dropFragment)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A convenience method for creating a new <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URI</CODE></A> whose scheme, host
and port are taken from the target host, but whose path, query and
fragment are taken from the existing URI.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="createURI(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
createURI</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A>
</FONT>public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> <B>createURI</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;scheme,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host,
int&nbsp;port,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;path,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;query,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;fragment)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../org/apache/http/client/utils/URIBuilder.html" title="class in org.apache.http.client.utils"><CODE>URIBuilder</CODE></A>.</I>
<P>
<DD>Constructs a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URI</CODE></A> using all the parameters. This should be
used instead of
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html#URI(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)" title="class or interface in java.net"><CODE>URI.URI(String, String, String, int, String, String, String)</CODE></A>
or any of the other URI multi-argument URI constructors.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>scheme</CODE> - Scheme name<DD><CODE>host</CODE> - Host name<DD><CODE>port</CODE> - Port number<DD><CODE>path</CODE> - Path<DD><CODE>query</CODE> - Query<DD><CODE>fragment</CODE> - Fragment
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></CODE> - If both a scheme and a path are given but the path is
relative, if the URI string constructed from the given
components violates RFC&nbsp;2396, or if the authority
component of the string is present but cannot be parsed
as a server-based authority</DL>
</DD>
</DL>
<HR>
<A NAME="rewriteURI(java.net.URI, org.apache.http.HttpHost, boolean)"><!-- --></A><H3>
rewriteURI</H3>
<PRE>
public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> <B>rewriteURI</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri,
<A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpHost.html" title="class or interface in org.apache.http">HttpHost</A>&nbsp;target,
boolean&nbsp;dropFragment)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></PRE>
<DL>
<DD>A convenience method for creating a new <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URI</CODE></A> whose scheme, host
and port are taken from the target host, but whose path, query and
fragment are taken from the existing URI. The fragment is only used if
dropFragment is false.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - Contains the path, query and fragment to use.<DD><CODE>target</CODE> - Contains the scheme, host and port to use.<DD><CODE>dropFragment</CODE> - True if the fragment should not be copied.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></CODE> - If the resulting URI is invalid.</DL>
</DD>
</DL>
<HR>
<A NAME="rewriteURI(java.net.URI, org.apache.http.HttpHost)"><!-- --></A><H3>
rewriteURI</H3>
<PRE>
public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> <B>rewriteURI</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri,
<A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpHost.html" title="class or interface in org.apache.http">HttpHost</A>&nbsp;target)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></PRE>
<DL>
<DD>A convenience method for
<A HREF="../../../../../org/apache/http/client/utils/URIUtils.html#rewriteURI(java.net.URI, org.apache.http.HttpHost, boolean)"><CODE>rewriteURI(URI, HttpHost, boolean)</CODE></A> that always keeps the
fragment.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="rewriteURI(java.net.URI)"><!-- --></A><H3>
rewriteURI</H3>
<PRE>
public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> <B>rewriteURI</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></PRE>
<DL>
<DD>A convenience method that creates a new <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URI</CODE></A> whose scheme, host, port, path,
query are taken from the existing URI, dropping any fragment or user-information.
The existing URI is returned unmodified if it has no fragment or user-information.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - original URI.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URISyntaxException.html" title="class or interface in java.net">URISyntaxException</A></CODE> - If the resulting URI is invalid.</DL>
</DD>
</DL>
<HR>
<A NAME="resolve(java.net.URI, java.lang.String)"><!-- --></A><H3>
resolve</H3>
<PRE>
public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> <B>resolve</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;baseURI,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;reference)</PRE>
<DL>
<DD>Resolves a URI reference against a base URI. Work-around for bug in
java.net.URI (<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4708535>)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>baseURI</CODE> - the base URI<DD><CODE>reference</CODE> - the URI reference
<DT><B>Returns:</B><DD>the resulting URI</DL>
</DD>
</DL>
<HR>
<A NAME="resolve(java.net.URI, java.net.URI)"><!-- --></A><H3>
resolve</H3>
<PRE>
public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A> <B>resolve</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;baseURI,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;reference)</PRE>
<DL>
<DD>Resolves a URI reference against a base URI. Work-around for bugs in
java.net.URI (e.g. <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4708535>)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>baseURI</CODE> - the base URI<DD><CODE>reference</CODE> - the URI reference
<DT><B>Returns:</B><DD>the resulting URI</DL>
</DD>
</DL>
<HR>
<A NAME="extractHost(java.net.URI)"><!-- --></A><H3>
extractHost</H3>
<PRE>
public static <A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpHost.html" title="class or interface in org.apache.http">HttpHost</A> <B>extractHost</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net">URI</A>&nbsp;uri)</PRE>
<DL>
<DD>Extracts target host from the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URI.html" title="class or interface in java.net"><CODE>URI</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> -
<DT><B>Returns:</B><DD>the target host if the URI is absolute or <code>null</null> if the URI is
relative or does not contain a valid host name.<DT><B>Since:</B></DT>
<DD>4.1</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/URIUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/http/client/utils/URIBuilder.html" title="class in org.apache.http.client.utils"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/http/client/utils/URLEncodedUtils.html" title="class in org.apache.http.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/http/client/utils/URIUtils.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="URIUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 1999-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>