blob: 2e6c843174631cc4a5fefb115c6074b97fc7ddf8 [file] [log] [blame]
<!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.6.0_33) on Tue Aug 21 16:43:19 CEST 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Base64 (Apache MINA 2.0.5 API)
</TITLE>
<META NAME="date" CONTENT="2012-08-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Base64 (Apache MINA 2.0.5 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= 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=2 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>&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/Base64.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="../../../../org/apache/mina/util/AvailablePortFinder.html" title="class in org.apache.mina.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/mina/util/CircularQueue.html" title="class in org.apache.mina.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/mina/util/Base64.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Base64.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_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.mina.util</FONT>
<BR>
Class Base64</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.mina.util.Base64</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Base64</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
Provides Base64 encoding and decoding as defined by RFC 2045.
<p>This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite>
from RFC 2045 <cite>Multipurpose Internet Mail Extensions (MIME) Part One:
Format of Internet Message Bodies</cite> by Freed and Borenstein.</p>
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Apache Software Foundation commons codec (http://commons.apache.org/codec/), <a href="http://mina.apache.org">Apache MINA Project</a></DD>
<DT><B>See Also:</B><DD><a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>
This class was</DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#Base64()">Base64</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#decode(byte[])">decode</A></B>(byte[]&nbsp;pArray)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes a byte[] containing containing
characters in the Base64 alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#decode(java.lang.Object)">decode</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;pObject)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes an Object using the base64 algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#decodeBase64(byte[])">decodeBase64</A></B>(byte[]&nbsp;base64Data)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes Base64 data into octects</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#encode(byte[])">encode</A></B>(byte[]&nbsp;pArray)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes a byte[] containing binary data, into a byte[] containing
characters in the Base64 alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#encode(java.lang.Object)">encode</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;pObject)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes an Object using the base64 algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#encodeBase64(byte[])">encodeBase64</A></B>(byte[]&nbsp;binaryData)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes binary data using the base64 algorithm but
does not chunk the output.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#encodeBase64(byte[], boolean)">encodeBase64</A></B>(byte[]&nbsp;binaryData,
boolean&nbsp;isChunked)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes binary data using the base64 algorithm, optionally
chunking the output into 76 character blocks.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#encodeBase64Chunked(byte[])">encodeBase64Chunked</A></B>(byte[]&nbsp;binaryData)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes binary data using the base64 algorithm and chunks
the encoded output into 76 character blocks</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/util/Base64.html#isArrayByteBase64(byte[])">isArrayByteBase64</A></B>(byte[]&nbsp;arrayOctect)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests a given byte array to see if it contains
only valid characters within the Base64 alphabet.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/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://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Base64()"><!-- --></A><H3>
Base64</H3>
<PRE>
public <B>Base64</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="isArrayByteBase64(byte[])"><!-- --></A><H3>
isArrayByteBase64</H3>
<PRE>
public static boolean <B>isArrayByteBase64</B>(byte[]&nbsp;arrayOctect)</PRE>
<DL>
<DD>Tests a given byte array to see if it contains
only valid characters within the Base64 alphabet.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>arrayOctect</CODE> - byte array to test
<DT><B>Returns:</B><DD>true if all bytes are valid characters in the Base64
alphabet or if the byte array is empty; false, otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="encodeBase64(byte[])"><!-- --></A><H3>
encodeBase64</H3>
<PRE>
public static byte[] <B>encodeBase64</B>(byte[]&nbsp;binaryData)</PRE>
<DL>
<DD>Encodes binary data using the base64 algorithm but
does not chunk the output.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>binaryData</CODE> - binary data to encode
<DT><B>Returns:</B><DD>Base64 characters</DL>
</DD>
</DL>
<HR>
<A NAME="encodeBase64Chunked(byte[])"><!-- --></A><H3>
encodeBase64Chunked</H3>
<PRE>
public static byte[] <B>encodeBase64Chunked</B>(byte[]&nbsp;binaryData)</PRE>
<DL>
<DD>Encodes binary data using the base64 algorithm and chunks
the encoded output into 76 character blocks
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>binaryData</CODE> - binary data to encode
<DT><B>Returns:</B><DD>Base64 characters chunked in 76 character blocks</DL>
</DD>
</DL>
<HR>
<A NAME="decode(java.lang.Object)"><!-- --></A><H3>
decode</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>decode</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;pObject)</PRE>
<DL>
<DD>Decodes an Object using the base64 algorithm. This method
is provided in order to satisfy the requirements of the
Decoder interface, and will throw a DecoderException if the
supplied object is not of type byte[].
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - Object to decode
<DT><B>Returns:</B><DD>An object (of type byte[]) containing the
binary data which corresponds to the byte[] supplied.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/security/InvalidParameterException.html?is-external=true" title="class or interface in java.security">InvalidParameterException</A></CODE> - if the parameter supplied is not
of type byte[]</DL>
</DD>
</DL>
<HR>
<A NAME="decode(byte[])"><!-- --></A><H3>
decode</H3>
<PRE>
public byte[] <B>decode</B>(byte[]&nbsp;pArray)</PRE>
<DL>
<DD>Decodes a byte[] containing containing
characters in the Base64 alphabet.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - A byte array containing Base64 character data
<DT><B>Returns:</B><DD>a byte array containing binary data</DL>
</DD>
</DL>
<HR>
<A NAME="encodeBase64(byte[], boolean)"><!-- --></A><H3>
encodeBase64</H3>
<PRE>
public static byte[] <B>encodeBase64</B>(byte[]&nbsp;binaryData,
boolean&nbsp;isChunked)</PRE>
<DL>
<DD>Encodes binary data using the base64 algorithm, optionally
chunking the output into 76 character blocks.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>binaryData</CODE> - Array containing binary data to encode.<DD><CODE>isChunked</CODE> - if isChunked is true this encoder will chunk
the base64 output into 76 character blocks
<DT><B>Returns:</B><DD>Base64-encoded data.</DL>
</DD>
</DL>
<HR>
<A NAME="decodeBase64(byte[])"><!-- --></A><H3>
decodeBase64</H3>
<PRE>
public static byte[] <B>decodeBase64</B>(byte[]&nbsp;base64Data)</PRE>
<DL>
<DD>Decodes Base64 data into octects
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>base64Data</CODE> - Byte array containing Base64 data
<DT><B>Returns:</B><DD>Array containing decoded data.</DL>
</DD>
</DL>
<HR>
<A NAME="encode(java.lang.Object)"><!-- --></A><H3>
encode</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>encode</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;pObject)</PRE>
<DL>
<DD>Encodes an Object using the base64 algorithm. This method
is provided in order to satisfy the requirements of the
Encoder interface, and will throw an EncoderException if the
supplied object is not of type byte[].
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - Object to encode
<DT><B>Returns:</B><DD>An object (of type byte[]) containing the
base64 encoded data which corresponds to the byte[] supplied.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/security/InvalidParameterException.html?is-external=true" title="class or interface in java.security">InvalidParameterException</A></CODE> - if the parameter supplied is not
of type byte[]</DL>
</DD>
</DL>
<HR>
<A NAME="encode(byte[])"><!-- --></A><H3>
encode</H3>
<PRE>
public byte[] <B>encode</B>(byte[]&nbsp;pArray)</PRE>
<DL>
<DD>Encodes a byte[] containing binary data, into a byte[] containing
characters in the Base64 alphabet.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - a byte array containing binary data
<DT><B>Returns:</B><DD>A byte array containing only Base64 character data</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=2 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/Base64.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="../../../../org/apache/mina/util/AvailablePortFinder.html" title="class in org.apache.mina.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/mina/util/CircularQueue.html" title="class in org.apache.mina.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/mina/util/Base64.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Base64.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 &#169; 2004-2012 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved.
</BODY>
</HTML>