1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
5
<!-- Generated by javadoc on Sun Oct 10 17:41:05 EDT 2004 -->
7
HttpClient 2.0.2 API: Class EncodingUtil
9
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
11
<BODY BGCOLOR="white">
13
<!-- ========== START OF NAVBAR ========== -->
14
<A NAME="navbar_top"><!-- --></A>
15
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
17
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
18
<A NAME="navbar_top_firstrow"><!-- --></A>
19
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
20
<TR ALIGN="center" VALIGN="top">
21
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
22
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
23
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
24
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EncodingUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
25
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
26
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
27
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
28
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
32
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
38
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
39
<A HREF="../../../../../org/apache/commons/httpclient/util/DateParser.html"><B>PREV CLASS</B></A>
40
<A HREF="../../../../../org/apache/commons/httpclient/util/HttpURLConnection.html"><B>NEXT CLASS</B></A></FONT></TD>
41
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
42
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
43
<A HREF="EncodingUtil.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
46
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
47
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
48
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
49
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
52
<!-- =========== END OF NAVBAR =========== -->
55
<!-- ======== START OF CLASS DATA ======== -->
58
org.apache.commons.httpclient.util</FONT>
60
Class EncodingUtil</H2>
62
<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html">java.lang.Object</A>
64
+--<B>org.apache.commons.httpclient.util.EncodingUtil</B>
68
<DT>public class <B>EncodingUtil</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html">Object</A></DL>
71
The home for utility methods that handle various encoding tasks.
74
<DT><B>Since: </B><DD>2.0 final</DD>
75
<DT><B>Author: </B><DD>Michael Becke</DD>
80
<!-- ======== INNER CLASS SUMMARY ======== -->
83
<!-- =========== FIELD SUMMARY =========== -->
86
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
89
<!-- ========== METHOD SUMMARY =========== -->
91
<A NAME="method_summary"><!-- --></A>
92
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
93
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
94
<TD COLSPAN=2><FONT SIZE="+2">
95
<B>Method Summary</B></FONT></TD>
97
<TR BGCOLOR="white" CLASS="TableRowColor">
98
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
99
<CODE>(package private) static void</CODE></FONT></TD>
100
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/util/EncodingUtil.html#<clinit>()"><clinit></A></B>()</CODE>
103
</TD>
105
<TR BGCOLOR="white" CLASS="TableRowColor">
106
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
107
<CODE>static <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
108
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/util/EncodingUtil.html#formUrlEncode(org.apache.commons.httpclient.NameValuePair[], java.lang.String)">formUrlEncode</A></B>(<A HREF="../../../../../org/apache/commons/httpclient/NameValuePair.html">NameValuePair</A>[] pairs,
109
<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> charset)</CODE>
112
Form-urlencoding routine.</TD>
115
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
116
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
117
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
118
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html">Object</A></B></TD>
120
<TR BGCOLOR="white" CLASS="TableRowColor">
121
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
127
<!-- ============ FIELD DETAIL =========== -->
130
<!-- ========= CONSTRUCTOR DETAIL ======== -->
133
<!-- ============ METHOD DETAIL ========== -->
135
<A NAME="method_detail"><!-- --></A>
136
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
137
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138
<TD COLSPAN=1><FONT SIZE="+2">
139
<B>Method Detail</B></FONT></TD>
143
<A NAME="<clinit>()"><!-- --></A><H3>
146
static void <B><clinit></B>()</PRE>
151
<A NAME="formUrlEncode(org.apache.commons.httpclient.NameValuePair[], java.lang.String)"><!-- --></A><H3>
154
public static <A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> <B>formUrlEncode</B>(<A HREF="../../../../../org/apache/commons/httpclient/NameValuePair.html">NameValuePair</A>[] pairs,
155
<A HREF="http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html">String</A> charset)</PRE>
157
<DD>Form-urlencoding routine.
159
The default encoding for all forms is `application/x-www-form-urlencoded'.
160
A form data set is represented in this media type as follows:
162
The form field names and values are escaped: space characters are replaced
163
by `+', and then reserved characters are escaped as per [URL]; that is,
164
non-alphanumeric characters are replaced by `%HH', a percent sign and two
165
hexadecimal digits representing the ASCII code of the character. Line breaks,
166
as in multi-line text field values, are represented as CR LF pairs, i.e. `%0D%0A'.<DD><DL>
167
<DT><B>Parameters:</B><DD><CODE>pairs</CODE> - the values to be encoded<DD><CODE>charset</CODE> - the character set of pairs to be encoded<DT><B>Returns:</B><DD>the urlencoded pairs<DT><B>Since: </B><DD>2.0 final</DD>
171
<!-- ========= END OF CLASS DATA ========= -->
174
<!-- ========== START OF NAVBAR ========== -->
175
<A NAME="navbar_bottom"><!-- --></A>
176
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
178
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
179
<A NAME="navbar_bottom_firstrow"><!-- --></A>
180
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
181
<TR ALIGN="center" VALIGN="top">
182
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
183
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
184
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
185
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EncodingUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
186
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
187
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
188
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
189
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
193
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
199
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
200
<A HREF="../../../../../org/apache/commons/httpclient/util/DateParser.html"><B>PREV CLASS</B></A>
201
<A HREF="../../../../../org/apache/commons/httpclient/util/HttpURLConnection.html"><B>NEXT CLASS</B></A></FONT></TD>
202
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
203
<A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
204
<A HREF="EncodingUtil.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
207
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
208
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
209
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
210
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
213
<!-- =========== END OF NAVBAR =========== -->
216
Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.