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
Decoder (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="Decoder (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/Decoder.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/CharEncoding.html" title="class in org.apache.commons.codec"><B>PREV CLASS</B></A>
60
<A HREF="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><B>NEXT CLASS</B></A></FONT></TD>
61
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
62
<A HREF="../../../../index.html?org/apache/commons/codec/Decoder.html" target="_top"><B>FRAMES</B></A>
63
<A HREF="Decoder.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
81
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
82
DETAIL: FIELD | CONSTR | <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</FONT>
94
Interface Decoder</H2>
96
<DT><B>All Known Subinterfaces:</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/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</A></DD>
99
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</A>, <A HREF="../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</A>, <A HREF="../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</A>, <A HREF="../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</A>, <A HREF="../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</A>, <A HREF="../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</A>, <A HREF="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</A></DD>
103
<DT><PRE>public interface <A HREF="../../../../src-html/org/apache/commons/codec/Decoder.html#line.33"><B>Decoder</B></A></DL>
107
<p>Provides the highest level of abstraction for Decoders.
108
This is the sister interface of <A HREF="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><CODE>Encoder</CODE></A>. All
109
Decoders implement this common generic interface.</p>
111
<p>Allows a user to pass a generic Object to any Decoder
112
implementation in the codec package.</p>
114
<p>One of the two interfaces at the center of the codec package.</p>
119
<DT><B>Version:</B></DT>
120
<DD>$Id: Decoder.java 797690 2009-07-24 23:28:35Z ggregory $</DD>
121
<DT><B>Author:</B></DT>
122
<DD>Apache Software Foundation</DD>
128
<!-- ========== METHOD SUMMARY =========== -->
130
<A NAME="method_summary"><!-- --></A>
131
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
132
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
133
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
134
<B>Method Summary</B></FONT></TH>
136
<TR BGCOLOR="white" CLASS="TableRowColor">
137
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
138
<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>
139
<TD><CODE><B><A HREF="../../../../org/apache/commons/codec/Decoder.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>
142
Decodes an "encoded" Object and returns a "decoded"
149
<!-- ============ METHOD DETAIL ========== -->
151
<A NAME="method_detail"><!-- --></A>
152
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
153
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
154
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
155
<B>Method Detail</B></FONT></TH>
159
<A NAME="decode(java.lang.Object)"><!-- --></A><H3>
162
<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/Decoder.html#line.53"><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)
163
throws <A HREF="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
165
<DD>Decodes an "encoded" Object and returns a "decoded"
166
Object. Note that the implementation of this
167
interface will try to cast the Object parameter
168
to the specific type expected by a particular Decoder
169
implementation. If a <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang"><CODE>ClassCastException</CODE></A> occurs
170
this decode method will throw a DecoderException.
173
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - an object to "decode"
174
<DT><B>Returns:</B><DD>a 'decoded" object
176
<DD><CODE><A HREF="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - a decoder exception can
177
be thrown for any number of reasons. Some good
178
candidates are that the parameter passed to this
179
method is null, a param cannot be cast to the
180
appropriate type for a specific encoder.</DL>
183
<!-- ========= END OF CLASS DATA ========= -->
187
<!-- ======= START OF BOTTOM NAVBAR ====== -->
188
<A NAME="navbar_bottom"><!-- --></A>
189
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
190
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
192
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
193
<A NAME="navbar_bottom_firstrow"><!-- --></A>
194
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
195
<TR ALIGN="center" VALIGN="top">
196
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
197
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
198
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
199
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Decoder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
200
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
201
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
202
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
203
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
207
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
213
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
214
<A HREF="../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><B>PREV CLASS</B></A>
215
<A HREF="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><B>NEXT CLASS</B></A></FONT></TD>
216
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
217
<A HREF="../../../../index.html?org/apache/commons/codec/Decoder.html" target="_top"><B>FRAMES</B></A>
218
<A HREF="Decoder.html" target="_top"><B>NO FRAMES</B></A>
219
<SCRIPT type="text/javascript">
222
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
227
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
234
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
235
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
236
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
237
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
240
<A NAME="skip-navbar_bottom"></A>
241
<!-- ======== END OF BOTTOM NAVBAR ======= -->
244
Copyright © 2002-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.