mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 09:36:27 +00:00
629 lines
24 KiB
HTML
629 lines
24 KiB
HTML
|
<!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_07) on Fri Mar 13 20:01:31 CET 2009 -->
|
||
|
<TITLE>
|
||
|
Base64 (Rice Pastry - API Specifications)
|
||
|
</TITLE>
|
||
|
|
||
|
<META NAME="date" CONTENT="2009-03-13">
|
||
|
|
||
|
<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 (Rice Pastry - API Specifications)";
|
||
|
}
|
||
|
}
|
||
|
</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> </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/Base64.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>
|
||
|
Rice Pastry API</EM>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
|
||
|
<TR>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../rice/p2p/util/AttachableCancellable.html" title="class in rice.p2p.util"><B>PREV CLASS</B></A>
|
||
|
<A HREF="../../../rice/p2p/util/Base64.InputStream.html" title="class in rice.p2p.util"><B>NEXT CLASS</B></A></FONT></TD>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../index.html?rice/p2p/util/Base64.html" target="_top"><B>FRAMES</B></A>
|
||
|
<A HREF="Base64.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: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||
|
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <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">
|
||
|
rice.p2p.util</FONT>
|
||
|
<BR>
|
||
|
Class Base64</H2>
|
||
|
<PRE>
|
||
|
java.lang.Object
|
||
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.p2p.util.Base64</B>
|
||
|
</PRE>
|
||
|
<HR>
|
||
|
<DL>
|
||
|
<DT><PRE>public class <B>Base64</B><DT>extends java.lang.Object</DL>
|
||
|
</PRE>
|
||
|
|
||
|
<P>
|
||
|
<HR>
|
||
|
|
||
|
<P>
|
||
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||
|
|
||
|
<A NAME="nested_class_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>Nested Class Summary</B></FONT></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static class</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.InputStream.html" title="class in rice.p2p.util">Base64.InputStream</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
A <CODE>Base64#InputStream</CODE> will read data from another
|
||
|
<CODE>InputStream</CODE>, given in the constructor,
|
||
|
and encode/decode to/from Base64 notation on the fly.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static class</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.OutputStream.html" title="class in rice.p2p.util">Base64.OutputStream</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
A <CODE>Base64#OutputStream</CODE> will write data to another
|
||
|
<CODE>OutputStream</CODE>, given in the constructor,
|
||
|
and encode/decode to/from Base64 notation on the fly.</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<!-- =========== FIELD SUMMARY =========== -->
|
||
|
|
||
|
<A NAME="field_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>Field Summary</B></FONT></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#DECODE">DECODE</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
Specify decoding.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#DONT_BREAK_LINES">DONT_BREAK_LINES</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
Don't break lines when encoding (violates strict Base64 specification)</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#ENCODE">ENCODE</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
Specify encoding.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#GZIP">GZIP</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
Specify that data should be gzip-compressed.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#NO_OPTIONS">NO_OPTIONS</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
No options specified.</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<!-- ========== 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>static byte[]</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#decode(byte[], int, int)">decode</A></B>(byte[] source,
|
||
|
int off,
|
||
|
int len)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Very low-level access to decoding ASCII characters in
|
||
|
the form of a byte array.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static byte[]</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#decode(java.lang.String)">decode</A></B>(java.lang.String s)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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 java.lang.Object</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#decodeToObject(java.lang.String)">decodeToObject</A></B>(java.lang.String encodedObject)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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 java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#encodeBytes(byte[])">encodeBytes</A></B>(byte[] source)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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 java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#encodeBytes(byte[], int)">encodeBytes</A></B>(byte[] source,
|
||
|
int options)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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 java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#encodeBytes(byte[], int, int)">encodeBytes</A></B>(byte[] source,
|
||
|
int off,
|
||
|
int len)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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 java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#encodeBytes(byte[], int, int, int)">encodeBytes</A></B>(byte[] source,
|
||
|
int off,
|
||
|
int len,
|
||
|
int options)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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 java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#encodeObject(java.io.Serializable)">encodeObject</A></B>(java.io.Serializable serializableObject)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
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 java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/p2p/util/Base64.html#encodeObject(java.io.Serializable, int)">encodeObject</A></B>(java.io.Serializable serializableObject,
|
||
|
int options)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Serializes an object and returns the Base64-encoded
|
||
|
version of that serialized object.</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<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.Object</B></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<P>
|
||
|
|
||
|
<!-- ============ FIELD DETAIL =========== -->
|
||
|
|
||
|
<A NAME="field_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>Field Detail</B></FONT></TH>
|
||
|
</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#rice.p2p.util.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#rice.p2p.util.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#rice.p2p.util.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#rice.p2p.util.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#rice.p2p.util.Base64.DONT_BREAK_LINES">Constant Field Values</A></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="encodeObject(java.io.Serializable)"><!-- --></A><H3>
|
||
|
encodeObject</H3>
|
||
|
<PRE>
|
||
|
public static java.lang.String <B>encodeObject</B>(java.io.Serializable 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 java.lang.String <B>encodeObject</B>(java.io.Serializable serializableObject,
|
||
|
int 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
|
||
|
<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="../../../rice/p2p/util/Base64.html#GZIP"><CODE>GZIP</CODE></A>,
|
||
|
<A HREF="../../../rice/p2p/util/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 java.lang.String <B>encodeBytes</B>(byte[] 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>
|
||
|
encodeBytes</H3>
|
||
|
<PRE>
|
||
|
public static java.lang.String <B>encodeBytes</B>(byte[] source,
|
||
|
int options)</PRE>
|
||
|
<DL>
|
||
|
<DD>Encodes a byte array into Base64 notation.
|
||
|
<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>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>options</CODE> - Specified options<DT><B>Since:</B></DT>
|
||
|
<DD>2.0</DD>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../rice/p2p/util/Base64.html#GZIP"><CODE>GZIP</CODE></A>,
|
||
|
<A HREF="../../../rice/p2p/util/Base64.html#DONT_BREAK_LINES"><CODE>DONT_BREAK_LINES</CODE></A></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="encodeBytes(byte[], int, int)"><!-- --></A><H3>
|
||
|
encodeBytes</H3>
|
||
|
<PRE>
|
||
|
public static java.lang.String <B>encodeBytes</B>(byte[] source,
|
||
|
int off,
|
||
|
int len)</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<DD><CODE>off</CODE> - Offset in array where conversion should begin<DD><CODE>len</CODE> - Length of data to convert<DT><B>Since:</B></DT>
|
||
|
<DD>1.4</DD>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="encodeBytes(byte[], int, int, int)"><!-- --></A><H3>
|
||
|
encodeBytes</H3>
|
||
|
<PRE>
|
||
|
public static java.lang.String <B>encodeBytes</B>(byte[] source,
|
||
|
int off,
|
||
|
int len,
|
||
|
int options)</PRE>
|
||
|
<DL>
|
||
|
<DD>Encodes a byte array into Base64 notation.
|
||
|
<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>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>breakLines</CODE> - Break lines at 80 characters or less.<DD><CODE>options</CODE> - Specified options<DT><B>Since:</B></DT>
|
||
|
<DD>2.0</DD>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../rice/p2p/util/Base64.html#GZIP"><CODE>GZIP</CODE></A>,
|
||
|
<A HREF="../../../rice/p2p/util/Base64.html#DONT_BREAK_LINES"><CODE>DONT_BREAK_LINES</CODE></A></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="decode(byte[], int, int)"><!-- --></A><H3>
|
||
|
decode</H3>
|
||
|
<PRE>
|
||
|
public static byte[] <B>decode</B>(byte[] source,
|
||
|
int off,
|
||
|
int len)</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>(java.lang.String 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="decodeToObject(java.lang.String)"><!-- --></A><H3>
|
||
|
decodeToObject</H3>
|
||
|
<PRE>
|
||
|
public static java.lang.Object <B>decodeToObject</B>(java.lang.String 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>
|
||
|
<!-- ========= 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> </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/Base64.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>
|
||
|
Rice Pastry API</EM>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
|
||
|
<TR>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../rice/p2p/util/AttachableCancellable.html" title="class in rice.p2p.util"><B>PREV CLASS</B></A>
|
||
|
<A HREF="../../../rice/p2p/util/Base64.InputStream.html" title="class in rice.p2p.util"><B>NEXT CLASS</B></A></FONT></TD>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../index.html?rice/p2p/util/Base64.html" target="_top"><B>FRAMES</B></A>
|
||
|
<A HREF="Base64.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: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||
|
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<A NAME="skip-navbar_bottom"></A>
|
||
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||
|
|
||
|
<HR>
|
||
|
<i>Copyright © 2001-2005 - Rice Pastry.</i>
|
||
|
</BODY>
|
||
|
</HTML>
|