📄 encoder.html
字号:
<!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.4.2_04) on Sat Jul 10 16:13:04 PDT 2004 -->
<TITLE>
Encoder (Encode/Decode Utilities (Version 1.3))
</TITLE>
<META NAME="keywords" CONTENT="org.apache.commons.codec.Encoder interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Encoder (Encode/Decode Utilities (Version 1.3))";
}
</SCRIPT>
</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=3 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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Encoder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="Encoder.html" target="_top"><B>NO FRAMES</B></A>
<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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <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.commons.codec</FONT>
<BR>
Interface Encoder</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A>, <A HREF="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</A></DD>
</DL>
<DL>
<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/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</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/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</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/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</A>, <A HREF="../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</A>, <A HREF="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>Encoder</B></DL>
<P>
<p>Provides the highest level of abstraction for Encoders. This is the sister interface of <A HREF="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><CODE>Decoder</CODE></A>. Every implementation of Encoder provides this common generic interface whic allows a user to pass a generic Object to any Encoder implementation in the codec package.</p>
<P>
<P>
<DL>
<DT><B>Version:</B></DT> <DD>$Id: Encoder.java,v 1.10 2004/02/29 04:08:31 tobrien Exp $</DD><DT><B>Author:</B></DT> <DD>Apache Software Foundation</DD></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/codec/Encoder.html#encode(java.lang.Object)">encode</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> pObject)</CODE>
<BR>
Encodes an "Object" and returns the encoded content as an Object.</TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ 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="encode(java.lang.Object)"><!-- --></A><H3>
encode</H3>
<PRE>
public <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>encode</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> pObject) throws <A HREF="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
<DL>
<DD>Encodes an "Object" and returns the encoded content as an Object. The Objects here may just be <code>byte[]</code> or <code>String</code>s depending on the implementation used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - An object ot encode<DT><B>Returns:</B><DD>An "encoded" Object<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></CODE> - an encoder exception is thrown if the encoder experiences a failure condition during the encoding process.</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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Encoder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="Encoder.html" target="_top"><B>NO FRAMES</B></A>
<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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
commons-codec version 1.3 - Copyright © 2002-2004 - Apache Software Foundation
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -