binarycodec.html
来自「JSP建站必须文件commons-codec-1.3.zip」· HTML 代码 · 共 738 行 · 第 1/3 页
HTML
738 行
<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(byte[])"><!-- --></A><H3>
encode</H3>
<PRE>
public byte[] <B>encode</B>(byte[] raw)</PRE>
<DL>
<DD>Converts an array of raw binary data into an array of ascii 0 and 1 characters.
<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>raw</CODE> - the raw binary data to convert<DT><B>Returns:</B><DD>0 and 1 ascii character bytes one for each bit of the argument<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode(byte[])"><CODE>BinaryEncoder.encode(byte[])</CODE></A></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> raw) throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
<DL>
<DD>Converts an array of raw binary data into an array of ascii 0 and 1 chars.
<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>raw</CODE> - the raw binary data to convert<DT><B>Returns:</B><DD>0 and 1 ascii character chars one for each bit of the argument<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 argument is not a byte[]<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/Encoder.html#encode(java.lang.Object)"><CODE>Encoder.encode(java.lang.Object)</CODE></A></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> ascii) throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
<DL>
<DD>Decodes a byte array where each byte represents an ascii '0' or '1'.
<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>ascii</CODE> - each byte represents an ascii '0' or '1'<DT><B>Returns:</B><DD>the raw encoded binary where each bit corresponds to a byte in the byte array argument<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 argument is not a byte[], char[] or String<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/Decoder.html#decode(java.lang.Object)"><CODE>Decoder.decode(java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="decode(byte[])"><!-- --></A><H3>
decode</H3>
<PRE>
public byte[] <B>decode</B>(byte[] ascii)</PRE>
<DL>
<DD>Decodes a byte array where each byte represents an ascii '0' or '1'.
<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>ascii</CODE> - each byte represents an ascii '0' or '1'<DT><B>Returns:</B><DD>the raw encoded binary where each bit corresponds to a byte in the byte array argument<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/Decoder.html#decode(java.lang.Object)"><CODE>Decoder.decode(Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="toByteArray(java.lang.String)"><!-- --></A><H3>
toByteArray</H3>
<PRE>
public byte[] <B>toByteArray</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> ascii)</PRE>
<DL>
<DD>Decodes a String where each char of the String represents an ascii '0' or '1'.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ascii</CODE> - String of '0' and '1' characters<DT><B>Returns:</B><DD>the raw encoded binary where each bit corresponds to a byte in the byte array argument<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/Decoder.html#decode(java.lang.Object)"><CODE>Decoder.decode(Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="fromAscii(char[])"><!-- --></A><H3>
fromAscii</H3>
<PRE>
public static byte[] <B>fromAscii</B>(char[] ascii)</PRE>
<DL>
<DD>Decodes a byte array where each char represents an ascii '0' or '1'.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ascii</CODE> - each char represents an ascii '0' or '1'<DT><B>Returns:</B><DD>the raw encoded binary where each bit corresponds to a char in the char array argument</DL>
</DD>
</DL>
<HR>
<A NAME="fromAscii(byte[])"><!-- --></A><H3>
fromAscii</H3>
<PRE>
public static byte[] <B>fromAscii</B>(byte[] ascii)</PRE>
<DL>
<DD>Decodes a byte array where each byte represents an ascii '0' or '1'.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ascii</CODE> - each byte represents an ascii '0' or '1'<DT><B>Returns:</B><DD>the raw encoded binary where each bit corresponds to a byte in the byte array argument</DL>
</DD>
</DL>
<HR>
<A NAME="toAsciiBytes(byte[])"><!-- --></A><H3>
toAsciiBytes</H3>
<PRE>
public static byte[] <B>toAsciiBytes</B>(byte[] raw)</PRE>
<DL>
<DD>Converts an array of raw binary data into an array of ascii 0 and 1 character bytes - each byte is a truncated char.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>raw</CODE> - the raw binary data to convert<DT><B>Returns:</B><DD>an array of 0 and 1 character bytes for each bit of the argument<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode(byte[])"><CODE>BinaryEncoder.encode(byte[])</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="toAsciiChars(byte[])"><!-- --></A><H3>
toAsciiChars</H3>
<PRE>
public static char[] <B>toAsciiChars</B>(byte[] raw)</PRE>
<DL>
<DD>Converts an array of raw binary data into an array of ascii 0 and 1 characters.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>raw</CODE> - the raw binary data to convert<DT><B>Returns:</B><DD>an array of 0 and 1 characters for each bit of the argument<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode(byte[])"><CODE>BinaryEncoder.encode(byte[])</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="toAsciiString(byte[])"><!-- --></A><H3>
toAsciiString</H3>
<PRE>
public static <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toAsciiString</B>(byte[] raw)</PRE>
<DL>
<DD>Converts an array of raw binary data into a String of ascii 0 and 1 characters.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>raw</CODE> - the raw binary data to convert<DT><B>Returns:</B><DD>a String of 0 and 1 characters representing the binary data<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode(byte[])"><CODE>BinaryEncoder.encode(byte[])</CODE></A></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/BinaryCodec.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/binary/Base64.html" title="class in org.apache.commons.codec.binary"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/apache/commons/codec/binary/Hex.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>
<A HREF="BinaryCodec.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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 + =
减小字号Ctrl + -
显示快捷键?