1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.6.0_07) on Thu Aug 06 17:42:38 BST 2009 -->
6
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
8
URLCodec (Commons Codec 1.4 API)
11
<META NAME="date" CONTENT="2009-08-06">
13
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
15
<SCRIPT type="text/javascript">
16
function windowTitle()
18
if (location.href.indexOf('is-external=true') == -1) {
19
parent.document.title="URLCodec (Commons Codec 1.4 API)";
28
<BODY BGCOLOR="white" onload="windowTitle();">
32
<!-- ========= START OF TOP NAVBAR ======= -->
33
<A NAME="navbar_top"><!-- --></A>
34
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
37
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38
<A NAME="navbar_top_firstrow"><!-- --></A>
39
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40
<TR ALIGN="center" VALIGN="top">
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
42
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
43
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
44
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/URLCodec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
45
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
46
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
47
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
48
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
52
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
58
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59
<A HREF="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><B>PREV CLASS</B></A>
60
NEXT CLASS</FONT></TD>
61
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
62
<A HREF="../../../../../index.html?org/apache/commons/codec/net/URLCodec.html" target="_top"><B>FRAMES</B></A>
63
<A HREF="URLCodec.html" target="_top"><B>NO FRAMES</B></A>
64
<SCRIPT type="text/javascript">
67
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
72
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
79
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
81
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
82
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
85
<A NAME="skip-navbar_top"></A>
86
<!-- ========= END OF TOP NAVBAR ========= -->
89
<!-- ======== START OF CLASS DATA ======== -->
92
org.apache.commons.codec.net</FONT>
96
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
97
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.codec.net.URLCodec</B>
100
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</A>, <A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A>, <A HREF="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</A>, <A HREF="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</A>, <A HREF="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</A>, <A HREF="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</A></DD>
104
<DT><PRE>public class <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.53"><B>URLCodec</B></A><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A>, <A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</A>, <A HREF="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</A>, <A HREF="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</A></DL>
108
<p>Implements the 'www-form-urlencoded' encoding scheme,
109
also misleadingly known as URL encoding.</p>
111
<p>For more detailed information please refer to
112
<a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1">
113
Chapter 17.13.4 'Form content types'</a> of the
114
<a href="http://www.w3.org/TR/html4/">HTML 4.01 Specification<a></p>
117
This codec is meant to be a replacement for standard Java classes
118
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLEncoder.html?is-external=true" title="class or interface in java.net"><CODE>URLEncoder</CODE></A> and <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLDecoder.html?is-external=true" title="class or interface in java.net"><CODE>URLDecoder</CODE></A>
119
on older Java platforms, as these classes in Java versions below
120
1.4 rely on the platform's default charset encoding.
126
<DT><B>Since:</B></DT>
128
<DT><B>Version:</B></DT>
129
<DD>$Id: URLCodec.java 798416 2009-07-28 06:35:58Z ggregory $</DD>
130
<DT><B>Author:</B></DT>
131
<DD>Apache Software Foundation</DD>
136
<!-- =========== FIELD SUMMARY =========== -->
138
<A NAME="field_summary"><!-- --></A>
139
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142
<B>Field Summary</B></FONT></TH>
144
<TR BGCOLOR="white" CLASS="TableRowColor">
145
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146
<CODE>protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
147
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#charset">charset</A></B></CODE>
150
The default charset used for string decoding and encoding.</TD>
152
<TR BGCOLOR="white" CLASS="TableRowColor">
153
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154
<CODE>protected static byte</CODE></FONT></TD>
155
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#ESCAPE_CHAR">ESCAPE_CHAR</A></B></CODE>
158
Consider this field final.</TD>
160
<TR BGCOLOR="white" CLASS="TableRowColor">
161
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162
<CODE>protected static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</A></CODE></FONT></TD>
163
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#WWW_FORM_URL">WWW_FORM_URL</A></B></CODE>
166
BitSet of www-form-url safe characters.</TD>
170
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
172
<A NAME="constructor_summary"><!-- --></A>
173
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
174
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
175
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
176
<B>Constructor Summary</B></FONT></TH>
178
<TR BGCOLOR="white" CLASS="TableRowColor">
179
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#URLCodec()">URLCodec</A></B>()</CODE>
182
Default constructor.</TD>
184
<TR BGCOLOR="white" CLASS="TableRowColor">
185
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#URLCodec(java.lang.String)">URLCodec</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> charset)</CODE>
188
Constructor which allows for the selection of a default charset</TD>
192
<!-- ========== METHOD SUMMARY =========== -->
194
<A NAME="method_summary"><!-- --></A>
195
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
196
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
197
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
198
<B>Method Summary</B></FONT></TH>
200
<TR BGCOLOR="white" CLASS="TableRowColor">
201
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202
<CODE> byte[]</CODE></FONT></TD>
203
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#decode(byte[])">decode</A></B>(byte[] bytes)</CODE>
206
Decodes an array of URL safe 7-bit characters into an array of
209
<TR BGCOLOR="white" CLASS="TableRowColor">
210
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
212
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#decode(java.lang.Object)">decode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> pObject)</CODE>
215
Decodes a URL safe object into its original form.</TD>
217
<TR BGCOLOR="white" CLASS="TableRowColor">
218
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
220
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#decode(java.lang.String)">decode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString)</CODE>
223
Decodes a URL safe string into its original form using the default
226
<TR BGCOLOR="white" CLASS="TableRowColor">
227
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
229
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#decode(java.lang.String, java.lang.String)">decode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString,
230
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> charset)</CODE>
233
Decodes a URL safe string into its original form using the
234
specified encoding.</TD>
236
<TR BGCOLOR="white" CLASS="TableRowColor">
237
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
238
<CODE>static byte[]</CODE></FONT></TD>
239
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#decodeUrl(byte[])">decodeUrl</A></B>(byte[] bytes)</CODE>
242
Decodes an array of URL safe 7-bit characters into an array of
245
<TR BGCOLOR="white" CLASS="TableRowColor">
246
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247
<CODE> byte[]</CODE></FONT></TD>
248
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(byte[])">encode</A></B>(byte[] bytes)</CODE>
251
Encodes an array of bytes into an array of URL safe 7-bit
254
<TR BGCOLOR="white" CLASS="TableRowColor">
255
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
256
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
257
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(java.lang.Object)">encode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> pObject)</CODE>
260
Encodes an object into its URL safe form.</TD>
262
<TR BGCOLOR="white" CLASS="TableRowColor">
263
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
264
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
265
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(java.lang.String)">encode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString)</CODE>
268
Encodes a string into its URL safe form using the default string
271
<TR BGCOLOR="white" CLASS="TableRowColor">
272
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
273
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
274
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(java.lang.String, java.lang.String)">encode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString,
275
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> charset)</CODE>
278
Encodes a string into its URL safe form using the specified string charset.</TD>
280
<TR BGCOLOR="white" CLASS="TableRowColor">
281
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282
<CODE>static byte[]</CODE></FONT></TD>
283
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encodeUrl(java.util.BitSet, byte[])">encodeUrl</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</A> urlsafe,
284
byte[] bytes)</CODE>
287
Encodes an array of bytes into an array of URL safe 7-bit characters.</TD>
289
<TR BGCOLOR="white" CLASS="TableRowColor">
290
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
291
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
292
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset()">getDefaultCharset</A></B>()</CODE>
295
The default charset used for string decoding and encoding.</TD>
297
<TR BGCOLOR="white" CLASS="TableRowColor">
298
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
299
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
300
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#getEncoding()">getEncoding</A></B>()</CODE>
303
<B>Deprecated.</B> <I>use #getDefaultCharset()</I></TD>
306
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
307
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
308
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
309
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
311
<TR BGCOLOR="white" CLASS="TableRowColor">
312
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
318
<!-- ============ FIELD DETAIL =========== -->
320
<A NAME="field_detail"><!-- --></A>
321
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
322
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
323
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
324
<B>Field Detail</B></FONT></TH>
328
<A NAME="charset"><!-- --></A><H3>
331
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.64"><B>charset</B></A></PRE>
333
<DD>The default charset used for string decoding and encoding. Consider this field final. The next major release may
334
break compatibility and make this field be final.
341
<A NAME="ESCAPE_CHAR"><!-- --></A><H3>
344
protected static byte <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.69"><B>ESCAPE_CHAR</B></A></PRE>
346
<DD>Consider this field final. The next major release may break compatibility and make this field be final.
353
<A NAME="WWW_FORM_URL"><!-- --></A><H3>
356
protected static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.73"><B>WWW_FORM_URL</B></A></PRE>
358
<DD>BitSet of www-form-url safe characters.
364
<!-- ========= CONSTRUCTOR DETAIL ======== -->
366
<A NAME="constructor_detail"><!-- --></A>
367
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
368
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
369
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
370
<B>Constructor Detail</B></FONT></TH>
374
<A NAME="URLCodec()"><!-- --></A><H3>
377
public <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.101"><B>URLCodec</B></A>()</PRE>
379
<DD>Default constructor.
384
<A NAME="URLCodec(java.lang.String)"><!-- --></A><H3>
387
public <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.110"><B>URLCodec</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> charset)</PRE>
389
<DD>Constructor which allows for the selection of a default charset
392
<DT><B>Parameters:</B><DD><CODE>charset</CODE> - the default string charset to use.</DL>
395
<!-- ============ METHOD DETAIL ========== -->
397
<A NAME="method_detail"><!-- --></A>
398
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
399
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
400
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
401
<B>Method Detail</B></FONT></TH>
405
<A NAME="encodeUrl(java.util.BitSet, byte[])"><!-- --></A><H3>
408
public static final byte[] <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.124"><B>encodeUrl</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</A> urlsafe,
409
byte[] bytes)</PRE>
411
<DD>Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped.
417
<DT><B>Parameters:</B><DD><CODE>urlsafe</CODE> - bitset of characters deemed URL safe<DD><CODE>bytes</CODE> - array of bytes to convert to URL safe characters
418
<DT><B>Returns:</B><DD>array of bytes containing URL safe characters</DL>
423
<A NAME="decodeUrl(byte[])"><!-- --></A><H3>
426
public static final byte[] <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.163"><B>decodeUrl</B></A>(byte[] bytes)
427
throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
429
<DD>Decodes an array of URL safe 7-bit characters into an array of
430
original bytes. Escaped characters are converted back to their
431
original representation.
437
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - array of URL safe characters
438
<DT><B>Returns:</B><DD>array of original bytes
440
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - Thrown if URL decoding is unsuccessful</DL>
445
<A NAME="encode(byte[])"><!-- --></A><H3>
448
public byte[] <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.194"><B>encode</B></A>(byte[] bytes)</PRE>
450
<DD>Encodes an array of bytes into an array of URL safe 7-bit
451
characters. Unsafe characters are escaped.
454
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode(byte[])">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A></CODE></DL>
457
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - array of bytes to convert to URL safe characters
458
<DT><B>Returns:</B><DD>array of bytes containing URL safe characters</DL>
463
<A NAME="decode(byte[])"><!-- --></A><H3>
466
public byte[] <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.208"><B>decode</B></A>(byte[] bytes)
467
throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
469
<DD>Decodes an array of URL safe 7-bit characters into an array of
470
original bytes. Escaped characters are converted back to their
471
original representation.
474
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode(byte[])">decode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</A></CODE></DL>
477
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - array of URL safe characters
478
<DT><B>Returns:</B><DD>array of original bytes
480
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - Thrown if URL decoding is unsuccessful</DL>
485
<A NAME="encode(java.lang.String, java.lang.String)"><!-- --></A><H3>
488
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.223"><B>encode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString,
489
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> charset)
490
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</A></PRE>
492
<DD>Encodes a string into its URL safe form using the specified string charset. Unsafe characters are escaped.
498
<DT><B>Parameters:</B><DD><CODE>pString</CODE> - string to convert to a URL safe form<DD><CODE>charset</CODE> - the charset for pString
499
<DT><B>Returns:</B><DD>URL safe string
501
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</A></CODE> - Thrown if charset is not supported</DL>
506
<A NAME="encode(java.lang.String)"><!-- --></A><H3>
509
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.240"><B>encode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString)
510
throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
512
<DD>Encodes a string into its URL safe form using the default string
513
charset. Unsafe characters are escaped.
516
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/StringEncoder.html#encode(java.lang.String)">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</A></CODE></DL>
519
<DT><B>Parameters:</B><DD><CODE>pString</CODE> - string to convert to a URL safe form
520
<DT><B>Returns:</B><DD>URL safe string
522
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></CODE> - Thrown if URL encoding is unsuccessful<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset()"><CODE>getDefaultCharset()</CODE></A></DL>
527
<A NAME="decode(java.lang.String, java.lang.String)"><!-- --></A><H3>
530
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.264"><B>decode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString,
531
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> charset)
532
throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A>,
533
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</A></PRE>
535
<DD>Decodes a URL safe string into its original form using the
536
specified encoding. Escaped characters are converted back
537
to their original representation.
543
<DT><B>Parameters:</B><DD><CODE>pString</CODE> - URL safe string to convert into its original form<DD><CODE>charset</CODE> - the original string charset
544
<DT><B>Returns:</B><DD>original string
546
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - Thrown if URL decoding is unsuccessful
547
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</A></CODE> - Thrown if charset is not
553
<A NAME="decode(java.lang.String)"><!-- --></A><H3>
556
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.282"><B>decode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString)
557
throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
559
<DD>Decodes a URL safe string into its original form using the default
560
string charset. Escaped characters are converted back to their
561
original representation.
564
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/StringDecoder.html#decode(java.lang.String)">decode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</A></CODE></DL>
567
<DT><B>Parameters:</B><DD><CODE>pString</CODE> - URL safe string to convert into its original form
568
<DT><B>Returns:</B><DD>original string
570
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - Thrown if URL decoding is unsuccessful<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset()"><CODE>getDefaultCharset()</CODE></A></DL>
575
<A NAME="encode(java.lang.Object)"><!-- --></A><H3>
578
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.303"><B>encode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> pObject)
579
throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
581
<DD>Encodes an object into its URL safe form. Unsafe characters are
585
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/Encoder.html#encode(java.lang.Object)">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</A></CODE></DL>
588
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - string to convert to a URL safe form
589
<DT><B>Returns:</B><DD>URL safe object
591
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></CODE> - Thrown if URL encoding is not
592
applicable to objects of this type or
593
if encoding is unsuccessful</DL>
598
<A NAME="decode(java.lang.Object)"><!-- --></A><H3>
601
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.328"><B>decode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> pObject)
602
throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
604
<DD>Decodes a URL safe object into its original form. Escaped characters are converted back to their original
608
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/Decoder.html#decode(java.lang.Object)">decode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</A></CODE></DL>
611
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - URL safe object to convert into its original form
612
<DT><B>Returns:</B><DD>original object
614
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - Thrown if the argument is not a <code>String</code> or <code>byte[]</code>. Thrown if a failure condition is
615
encountered during the decode process.</DL>
620
<A NAME="getEncoding()"><!-- --></A><H3>
623
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.348"><B>getEncoding</B></A>()</PRE>
625
<DD><B>Deprecated.</B> <I>use #getDefaultCharset()</I>
627
<DD>The <code>String</code> encoding used for decoding and encoding.
634
<DT><B>Returns:</B><DD>Returns the encoding.</DL>
639
<A NAME="getDefaultCharset()"><!-- --></A><H3>
640
getDefaultCharset</H3>
642
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/net/URLCodec.html#line.357"><B>getDefaultCharset</B></A>()</PRE>
644
<DD>The default charset used for string decoding and encoding.
651
<DT><B>Returns:</B><DD>the default string charset.</DL>
654
<!-- ========= END OF CLASS DATA ========= -->
658
<!-- ======= START OF BOTTOM NAVBAR ====== -->
659
<A NAME="navbar_bottom"><!-- --></A>
660
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
661
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
663
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
664
<A NAME="navbar_bottom_firstrow"><!-- --></A>
665
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
666
<TR ALIGN="center" VALIGN="top">
667
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
668
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
669
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
670
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/URLCodec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
671
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
672
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
673
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
674
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
678
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
684
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
685
<A HREF="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><B>PREV CLASS</B></A>
686
NEXT CLASS</FONT></TD>
687
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
688
<A HREF="../../../../../index.html?org/apache/commons/codec/net/URLCodec.html" target="_top"><B>FRAMES</B></A>
689
<A HREF="URLCodec.html" target="_top"><B>NO FRAMES</B></A>
690
<SCRIPT type="text/javascript">
693
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
698
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
705
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
706
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
707
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
708
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
711
<A NAME="skip-navbar_bottom"></A>
712
<!-- ======== END OF BOTTOM NAVBAR ======= -->
715
Copyright © 2002-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.