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

📄 base64.html

📁 IText PDF开发工具说明文档,使用很方便。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
   GZIP: gzip-compresses object before encoding it.   DONT_BREAK_LINES: don't break lines at 76 characters     <i>Note: Technically, this makes your encoding non-compliant.</i> </pre> <p> Example: <code>encodeBytes( myData, Base64.GZIP )</code> or <p> Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code><P><DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - The data to convert<DD><CODE>off</CODE> - Offset in array where conversion should begin<DD><CODE>len</CODE> - Length of data to convert<DD><CODE>options</CODE> - Specified options                alphabet type is pulled from this (standard, url-safe, ordered)<DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../../../../com/lowagie/text/pdf/codec/Base64.html#GZIP"><CODE>GZIP</CODE></A>, <A HREF="../../../../../com/lowagie/text/pdf/codec/Base64.html#DONT_BREAK_LINES"><CODE>DONT_BREAK_LINES</CODE></A></DL></DD></DL><HR><A NAME="decode4to3(byte[], int, byte[], int, int)"><!-- --></A><H3>decode4to3</H3><PRE>private static int <B>decode4to3</B>(byte[]&nbsp;source,                              int&nbsp;srcOffset,                              byte[]&nbsp;destination,                              int&nbsp;destOffset,                              int&nbsp;options)</PRE><DL><DD>Decodes four bytes from array <var>source</var> and writes the resulting bytes (up to three of them) to <var>destination</var>. The source and destination arrays can be manipulated anywhere along their length by specifying <var>srcOffset</var> and <var>destOffset</var>. This method does not check to make sure your arrays are large enough to accomodate <var>srcOffset</var> + 4 for the <var>source</var> array or <var>destOffset</var> + 3 for the <var>destination</var> array. This method returns the actual number of bytes that were converted from the Base64 encoding. <p>This is the lowest level of the decoding methods with all possible parameters.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - the array to convert<DD><CODE>srcOffset</CODE> - the index where conversion begins<DD><CODE>destination</CODE> - the array to hold the conversion<DD><CODE>destOffset</CODE> - the index where output will be put<DD><CODE>options</CODE> - alphabet type is pulled from this (standard, url-safe, ordered)<DT><B>Returns:</B><DD>the number of decoded bytes converted<DT><B>Since:</B></DT>  <DD>1.3</DD></DL></DD></DL><HR><A NAME="decode(byte[], int, int, int)"><!-- --></A><H3>decode</H3><PRE>public static byte[] <B>decode</B>(byte[]&nbsp;source,                            int&nbsp;off,                            int&nbsp;len,                            int&nbsp;options)</PRE><DL><DD>Very low-level access to decoding ASCII characters in the form of a byte array. Does not support automatically gunzipping or any other "fancy" features.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - The Base64 encoded data<DD><CODE>off</CODE> - The offset of where to begin decoding<DD><CODE>len</CODE> - The length of characters to decode<DT><B>Returns:</B><DD>decoded data<DT><B>Since:</B></DT>  <DD>1.3</DD></DL></DD></DL><HR><A NAME="decode(java.lang.String)"><!-- --></A><H3>decode</H3><PRE>public static byte[] <B>decode</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</PRE><DL><DD>Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the string to decode<DT><B>Returns:</B><DD>the decoded data<DT><B>Since:</B></DT>  <DD>1.4</DD></DL></DD></DL><HR><A NAME="decode(java.lang.String, int)"><!-- --></A><H3>decode</H3><PRE>public static byte[] <B>decode</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s,                            int&nbsp;options)</PRE><DL><DD>Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the string to decode<DD><CODE>options</CODE> - encode options such as URL_SAFE<DT><B>Returns:</B><DD>the decoded data<DT><B>Since:</B></DT>  <DD>1.4</DD></DL></DD></DL><HR><A NAME="decodeToObject(java.lang.String)"><!-- --></A><H3>decodeToObject</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>decodeToObject</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encodedObject)</PRE><DL><DD>Attempts to decode Base64 data and deserialize a Java Object within. Returns <tt>null</tt> if there was an error.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>encodedObject</CODE> - The Base64 data to decode<DT><B>Returns:</B><DD>The decoded and deserialized object<DT><B>Since:</B></DT>  <DD>1.5</DD></DL></DD></DL><HR><A NAME="encodeToFile(byte[], java.lang.String)"><!-- --></A><H3>encodeToFile</H3><PRE>public static boolean <B>encodeToFile</B>(byte[]&nbsp;dataToEncode,                                   <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename)</PRE><DL><DD>Convenience method for encoding data to a file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dataToEncode</CODE> - byte array of data to encode in base64 form<DD><CODE>filename</CODE> - Filename for saving encoded data<DT><B>Returns:</B><DD><tt>true</tt> if successful, <tt>false</tt> otherwise<DT><B>Since:</B></DT>  <DD>2.1</DD></DL></DD></DL><HR><A NAME="decodeToFile(java.lang.String, java.lang.String)"><!-- --></A><H3>decodeToFile</H3><PRE>public static boolean <B>decodeToFile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;dataToDecode,                                   <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename)</PRE><DL><DD>Convenience method for decoding data to a file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dataToDecode</CODE> - Base64-encoded data as a string<DD><CODE>filename</CODE> - Filename for saving decoded data<DT><B>Returns:</B><DD><tt>true</tt> if successful, <tt>false</tt> otherwise<DT><B>Since:</B></DT>  <DD>2.1</DD></DL></DD></DL><HR><A NAME="decodeFromFile(java.lang.String)"><!-- --></A><H3>decodeFromFile</H3><PRE>public static byte[] <B>decodeFromFile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename)</PRE><DL><DD>Convenience method for reading a base64-encoded file and decoding it.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>filename</CODE> - Filename for reading encoded data<DT><B>Returns:</B><DD>decoded byte array or null if unsuccessful<DT><B>Since:</B></DT>  <DD>2.1</DD></DL></DD></DL><HR><A NAME="encodeFromFile(java.lang.String)"><!-- --></A><H3>encodeFromFile</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>encodeFromFile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename)</PRE><DL><DD>Convenience method for reading a binary file and base64-encoding it.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>filename</CODE> - Filename for reading binary data<DT><B>Returns:</B><DD>base64-encoded string or null if unsuccessful<DT><B>Since:</B></DT>  <DD>2.1</DD></DL></DD></DL><HR><A NAME="encodeFileToFile(java.lang.String, java.lang.String)"><!-- --></A><H3>encodeFileToFile</H3><PRE>public static void <B>encodeFileToFile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;infile,                                    <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;outfile)</PRE><DL><DD>Reads <tt>infile</tt> and encodes it to <tt>outfile</tt>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>infile</CODE> - Input file<DD><CODE>outfile</CODE> - Output file<DT><B>Since:</B></DT>  <DD>2.2</DD></DL></DD></DL><HR><A NAME="decodeFileToFile(java.lang.String, java.lang.String)"><!-- --></A><H3>decodeFileToFile</H3><PRE>public static void <B>decodeFileToFile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;infile,                                    <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;outfile)</PRE><DL><DD>Reads <tt>infile</tt> and decodes it to <tt>outfile</tt>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>infile</CODE> - Input file<DD><CODE>outfile</CODE> - Output file<DT><B>Since:</B></DT>  <DD>2.2</DD></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="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>Hosted by <a href="http://www.hostbasket.com/">Hostbasket</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../../com/lowagie/text/pdf/codec/Base64.InputStream.html" title="class in com.lowagie.text.pdf.codec"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html?com/lowagie/text/pdf/codec/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;<A HREF="#nested_class_summary">NESTED</A>&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></BODY></HTML>

⌨️ 快捷键说明

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