⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httputils.html

📁 java API学习JAVA的人必备之品
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</TR>
</TABLE>

<A NAME="HttpUtils()"><!-- --></A><H3>
HttpUtils</H3>
<PRE>
public <B>HttpUtils</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Constructs an empty <code>HttpUtils</code> object.
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="parseQueryString(java.lang.String)"><!-- --></A><H3>
parseQueryString</H3>
<PRE>
public static java.util.Hashtable <B>parseQueryString</B>(java.lang.String&nbsp;s)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Parses a query string passed from the client to the
 server and builds a <code>HashTable</code> object
 with key-value pairs. 
 The query string should be in the form of a string
 packaged by the GET or POST method, that is, it
 should have key-value pairs in the form <i>key=value</i>,
 with each pair separated from the next by a &amp; character.

 <p>A key can appear more than once in the query string
 with different values. However, the key appears only once in 
 the hashtable, with its value being
 an array of strings containing the multiple values sent
 by the query string.
 
 <p>The keys and values in the hashtable are stored in their
 decoded form, so
 any + characters are converted to spaces, and characters
 sent in hexadecimal notation (like <i>%xx</i>) are
 converted to ASCII characters.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - a string containing the query to be parsed
<DT><B>Returns:</B><DD>a <code>HashTable</code> object built
 			from the parsed key-value pairs
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the query string 
						is invalid</DL>
</DD>
</DL>
<HR>

<A NAME="parsePostData(int, javax.servlet.ServletInputStream)"><!-- --></A><H3>
parsePostData</H3>
<PRE>
public static java.util.Hashtable <B>parsePostData</B>(int&nbsp;len,
                                                <A HREF="../../../javax/servlet/ServletInputStream.html" title="class in javax.servlet">ServletInputStream</A>&nbsp;in)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Parses data from an HTML form that the client sends to 
 the server using the HTTP POST method and the 
 <i>application/x-www-form-urlencoded</i> MIME type.

 <p>The data sent by the POST method contains key-value
 pairs. A key can appear more than once in the POST data
 with different values. However, the key appears only once in 
 the hashtable, with its value being
 an array of strings containing the multiple values sent
 by the POST method.

 <p>The keys and values in the hashtable are stored in their
 decoded form, so
 any + characters are converted to spaces, and characters
 sent in hexadecimal notation (like <i>%xx</i>) are
 converted to ASCII characters.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>len</CODE> - an integer specifying the length,
			in characters, of the 
			<code>ServletInputStream</code>
			object that is also passed to this
			method<DD><CODE>in</CODE> - the <code>ServletInputStream</code>
			object that contains the data sent
			from the client
<DT><B>Returns:</B><DD>a <code>HashTable</code> object built
			from the parsed key-value pairs
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the data
			sent by the POST method is invalid</DL>
</DD>
</DL>
<HR>

<A NAME="getRequestURL(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
getRequestURL</H3>
<PRE>
public static java.lang.StringBuffer <B>getRequestURL</B>(<A HREF="../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</A>&nbsp;req)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Reconstructs the URL the client used to make the request,
 using information in the <code>HttpServletRequest</code> object.
 The returned URL contains a protocol, server name, port
 number, and server path, but it does not include query
 string parameters.
 
 <p>Because this method returns a <code>StringBuffer</code>,
 not a string, you can modify the URL easily, for example,
 to append query parameters.

 <p>This method is useful for creating redirect messages
 and for reporting errors.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>req</CODE> - a <code>HttpServletRequest</code> object
			containing the client's request
<DT><B>Returns:</B><DD>a <code>StringBuffer</code> object containing
			the reconstructed URL</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=3 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/HttpUtils.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="../../../javax/servlet/http/HttpSessionEvent.html" title="class in javax.servlet.http"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="HttpUtils.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &copy; 1999-2002 The Apache Software Foundation.  All Rights Reserved.
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -