⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 base64.html

📁 java编码的一个开发包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<HR>

<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>
</DL>
</DD>
<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>
</DL>
</DD>
<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>
</DL>
</DD>
<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://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>decode</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>&nbsp;pObject)              throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></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>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>
</DD>
<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="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</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>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>
</DD>
<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>
</DL>
</DD>
<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>
</DL>
</DD>
<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="discardWhitespace(byte[])"><!-- --></A><H3>
discardWhitespace</H3>
<PRE>
static byte[] <B>discardWhitespace</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>Discards any whitespace from a base-64 encoded block.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - The base-64 encoded data to discard the whitespace from.<DT><B>Returns:</B><DD>The data, less whitespace (see RFC 2045).</DL>
</DD>
</DL>
<HR>

<A NAME="discardNonBase64(byte[])"><!-- --></A><H3>
discardNonBase64</H3>
<PRE>
static byte[] <B>discardNonBase64</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>Discards any characters outside of the base64 alphabet, per the requirements on page 25 of RFC 2045 - "Any characters outside of the base64 alphabet are to be ignored in base64 encoded data."
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - The base-64 encoded data to groom<DT><B>Returns:</B><DD>The data, less non-base64 characters (see RFC 2045).</DL>
</DD>
</DL>
<HR>

<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>&nbsp;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 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>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>
</DD>
<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="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</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>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>
</DD>
<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=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>&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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><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>  &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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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>
commons-codec version 1.3 - Copyright &copy; 2002-2004 - Apache Software Foundation
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -