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

📄 base64.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#decode(java.lang.String)">decode</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it.</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/geotools/data/postgis/attributeio/Base64.html#decodeFromFile(java.lang.String)">decodeFromFile</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;filename)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method for reading a base64-encoded file and decoding it.</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/geotools/data/postgis/attributeio/Base64.html#decodeToFile(java.lang.String, java.lang.String)">decodeToFile</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" 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" title="class or interface in java.lang">String</A>&nbsp;filename)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method for decoding data to a file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#decodeToObject(java.lang.String)">decodeToObject</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;encodedObject)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempts to decode Base64 data and deserialize a Java Object within. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#encodeBytes(byte[])">encodeBytes</A></B>(byte[]&nbsp;source)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes a byte array into Base64 notation. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#encodeBytes(byte[], int)">encodeBytes</A></B>(byte[]&nbsp;source,            int&nbsp;options)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes a byte array into Base64 notation. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#encodeBytes(byte[], int, int)">encodeBytes</A></B>(byte[]&nbsp;source,            int&nbsp;off,            int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes a byte array into Base64 notation. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#encodeBytes(byte[], int, int, int)">encodeBytes</A></B>(byte[]&nbsp;source,            int&nbsp;off,            int&nbsp;len,            int&nbsp;options)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes a byte array into Base64 notation. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#encodeFromFile(java.lang.String)">encodeFromFile</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;filename)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method for reading a binary file and base64-encoding it.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#encodeObject(java.io.Serializable)">encodeObject</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>&nbsp;serializableObject)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes an object and returns the Base64-encoded version of that serialized object. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#encodeObject(java.io.Serializable, int)">encodeObject</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>&nbsp;serializableObject,             int&nbsp;options)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes an object and returns the Base64-encoded version of that serialized object. </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/geotools/data/postgis/attributeio/Base64.html#encodeToFile(byte[], java.lang.String)">encodeToFile</A></B>(byte[]&nbsp;dataToEncode,             <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;filename)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method for encoding data to a file.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="NO_OPTIONS"><!-- --></A><H3>NO_OPTIONS</H3><PRE>public static final int <B>NO_OPTIONS</B></PRE><DL><DD>No options specified. Value is zero.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.geotools.data.postgis.attributeio.Base64.NO_OPTIONS">Constant Field Values</A></DL></DL><HR><A NAME="ENCODE"><!-- --></A><H3>ENCODE</H3><PRE>public static final int <B>ENCODE</B></PRE><DL><DD>Specify encoding.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.geotools.data.postgis.attributeio.Base64.ENCODE">Constant Field Values</A></DL></DL><HR><A NAME="DECODE"><!-- --></A><H3>DECODE</H3><PRE>public static final int <B>DECODE</B></PRE><DL><DD>Specify decoding.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.geotools.data.postgis.attributeio.Base64.DECODE">Constant Field Values</A></DL></DL><HR><A NAME="GZIP"><!-- --></A><H3>GZIP</H3><PRE>public static final int <B>GZIP</B></PRE><DL><DD>Specify that data should be gzip-compressed.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.geotools.data.postgis.attributeio.Base64.GZIP">Constant Field Values</A></DL></DL><HR><A NAME="DONT_BREAK_LINES"><!-- --></A><H3>DONT_BREAK_LINES</H3><PRE>public static final int <B>DONT_BREAK_LINES</B></PRE><DL><DD>Don't break lines when encoding (violates strict Base64 specification)<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.geotools.data.postgis.attributeio.Base64.DONT_BREAK_LINES">Constant Field Values</A></DL></DL><!-- ========= 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="encodeObject(java.io.Serializable)"><!-- --></A><H3>encodeObject</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>encodeObject</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>&nbsp;serializableObject)</PRE><DL><DD>Serializes an object and returns the Base64-encoded version of that serialized object. If the object cannot be serialized or there is another error, the method will return <tt>null</tt>. The object is not GZip-compressed before being encoded.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>serializableObject</CODE> - The object to encode<DT><B>Returns:</B><DD>The Base64-encoded object<DT><B>Since:</B></DT>  <DD>1.4</DD></DL></DD></DL><HR><A NAME="encodeObject(java.io.Serializable, int)"><!-- --></A><H3>encodeObject</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>encodeObject</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>&nbsp;serializableObject,                                  int&nbsp;options)</PRE><DL><DD>Serializes an object and returns the Base64-encoded version of that serialized object. If the object cannot be serialized or there is another error, the method will return <tt>null</tt>. <p> Valid options:<pre>   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>encodeObject( myObj, Base64.GZIP )</code> or <p> Example: <code>encodeObject( myObj, Base64.GZIP | Base64.DONT_BREAK_LINES )</code><P><DD><DL><DT><B>Parameters:</B><DD><CODE>serializableObject</CODE> - The object to encode<DD><CODE>options</CODE> - Specified options<DT><B>Returns:</B><DD>The Base64-encoded object<DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#GZIP"><CODE>GZIP</CODE></A>, <A HREF="../../../../../org/geotools/data/postgis/attributeio/Base64.html#DONT_BREAK_LINES"><CODE>DONT_BREAK_LINES</CODE></A></DL></DD></DL><HR><A NAME="encodeBytes(byte[])"><!-- --></A><H3>encodeBytes</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>encodeBytes</B>(byte[]&nbsp;source)</PRE><DL><DD>Encodes a byte array into Base64 notation. Does not GZip-compress data.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - The data to convert<DT><B>Since:</B></DT>  <DD>1.4</DD></DL></DD></DL><HR><A NAME="encodeBytes(byte[], int)"><!-- --></A><H3>

⌨️ 快捷键说明

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