PageRenderTime 23ms CodeModel.GetById 10ms app.highlight 9ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/bouncycastle/docs/org/bouncycastle/util/encoders/Base64.html

https://bitbucket.org/arkban/somersault
HTML | 384 lines | 315 code | 47 blank | 22 comment | 0 complexity | dd16dd3a2e4af9d2053c21603e8835d3 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, Apache-2.0
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<!--NewPage-->
  3<HTML>
  4<HEAD>
  5<!-- Generated by javadoc (build 1.6.0) on Mon Jan 11 13:46:41 EST 2010 -->
  6<TITLE>
  7Base64 (Bouncy Castle Library 1.45 API Specification)
  8</TITLE>
  9
 10<META NAME="date" CONTENT="2010-01-11">
 11
 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
 13
 14<SCRIPT type="text/javascript">
 15function windowTitle()
 16{
 17    if (location.href.indexOf('is-external=true') == -1) {
 18        parent.document.title="Base64 (Bouncy Castle Library 1.45 API Specification)";
 19    }
 20}
 21</SCRIPT>
 22<NOSCRIPT>
 23</NOSCRIPT>
 24
 25</HEAD>
 26
 27<BODY BGCOLOR="white" onload="windowTitle();">
 28<HR>
 29
 30
 31<!-- ========= START OF TOP NAVBAR ======= -->
 32<A NAME="navbar_top"><!-- --></A>
 33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 35<TR>
 36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 37<A NAME="navbar_top_firstrow"><!-- --></A>
 38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 39  <TR ALIGN="center" VALIGN="top">
 40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 47  </TR>
 48</TABLE>
 49</TD>
 50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 51<b>Bouncy Castle Cryptography Library 1.45</b></EM>
 52</TD>
 53</TR>
 54
 55<TR>
 56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 57&nbsp;PREV CLASS&nbsp;
 58&nbsp;<A HREF="../../../../org/bouncycastle/util/encoders/Base64Encoder.html" title="class in org.bouncycastle.util.encoders"><B>NEXT CLASS</B></A></FONT></TD>
 59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 60  <A HREF="../../../../index.html?org/bouncycastle/util/encoders/Base64.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 61&nbsp;<A HREF="Base64.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 62&nbsp;<SCRIPT type="text/javascript">
 63  <!--
 64  if(window==top) {
 65    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 66  }
 67  //-->
 68</SCRIPT>
 69<NOSCRIPT>
 70  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 71</NOSCRIPT>
 72
 73
 74</FONT></TD>
 75</TR>
 76<TR>
 77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 78  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 80DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 81</TR>
 82</TABLE>
 83<A NAME="skip-navbar_top"></A>
 84<!-- ========= END OF TOP NAVBAR ========= -->
 85
 86<HR>
 87<!-- ======== START OF CLASS DATA ======== -->
 88<H2>
 89<FONT SIZE="-1">
 90org.bouncycastle.util.encoders</FONT>
 91<BR>
 92Class Base64</H2>
 93<PRE>
 94java.lang.Object
 95  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.bouncycastle.util.encoders.Base64</B>
 96</PRE>
 97<HR>
 98<DL>
 99<DT><PRE>public class <B>Base64</B><DT>extends java.lang.Object</DL>
100</PRE>
101
102<P>
103<HR>
104
105<P>
106
107<!-- ======== CONSTRUCTOR SUMMARY ======== -->
108
109<A NAME="constructor_summary"><!-- --></A>
110<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
111<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
112<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
113<B>Constructor Summary</B></FONT></TH>
114</TR>
115<TR BGCOLOR="white" CLASS="TableRowColor">
116<TD><CODE><B><A HREF="../../../../org/bouncycastle/util/encoders/Base64.html#Base64()">Base64</A></B>()</CODE>
117
118<BR>
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
120</TR>
121</TABLE>
122&nbsp;
123<!-- ========== METHOD SUMMARY =========== -->
124
125<A NAME="method_summary"><!-- --></A>
126<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
127<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
128<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
129<B>Method Summary</B></FONT></TH>
130</TR>
131<TR BGCOLOR="white" CLASS="TableRowColor">
132<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
133<CODE>static&nbsp;byte[]</CODE></FONT></TD>
134<TD><CODE><B><A HREF="../../../../org/bouncycastle/util/encoders/Base64.html#decode(byte[])">decode</A></B>(byte[]&nbsp;data)</CODE>
135
136<BR>
137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decode the base 64 encoded input data.</TD>
138</TR>
139<TR BGCOLOR="white" CLASS="TableRowColor">
140<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
141<CODE>static&nbsp;byte[]</CODE></FONT></TD>
142<TD><CODE><B><A HREF="../../../../org/bouncycastle/util/encoders/Base64.html#decode(java.lang.String)">decode</A></B>(java.lang.String&nbsp;data)</CODE>
143
144<BR>
145&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decode the base 64 encoded String data - whitespace will be ignored.</TD>
146</TR>
147<TR BGCOLOR="white" CLASS="TableRowColor">
148<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
149<CODE>static&nbsp;int</CODE></FONT></TD>
150<TD><CODE><B><A HREF="../../../../org/bouncycastle/util/encoders/Base64.html#decode(java.lang.String, java.io.OutputStream)">decode</A></B>(java.lang.String&nbsp;data,
151       java.io.OutputStream&nbsp;out)</CODE>
152
153<BR>
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decode the base 64 encoded String data writing it to the given output stream,
155 whitespace characters will be ignored.</TD>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>static&nbsp;byte[]</CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../../org/bouncycastle/util/encoders/Base64.html#encode(byte[])">encode</A></B>(byte[]&nbsp;data)</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encode the input data producing a base 64 encoded byte array.</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>static&nbsp;int</CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../../org/bouncycastle/util/encoders/Base64.html#encode(byte[], int, int, java.io.OutputStream)">encode</A></B>(byte[]&nbsp;data,
169       int&nbsp;off,
170       int&nbsp;length,
171       java.io.OutputStream&nbsp;out)</CODE>
172
173<BR>
174&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encode the byte data to base 64 writing it to the given output stream.</TD>
175</TR>
176<TR BGCOLOR="white" CLASS="TableRowColor">
177<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
178<CODE>static&nbsp;int</CODE></FONT></TD>
179<TD><CODE><B><A HREF="../../../../org/bouncycastle/util/encoders/Base64.html#encode(byte[], java.io.OutputStream)">encode</A></B>(byte[]&nbsp;data,
180       java.io.OutputStream&nbsp;out)</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encode the byte data to base 64 writing it to the given output stream.</TD>
184</TR>
185</TABLE>
186&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
187<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
189<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
190</TR>
191<TR BGCOLOR="white" CLASS="TableRowColor">
192<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
193</TR>
194</TABLE>
195&nbsp;
196<P>
197
198<!-- ========= CONSTRUCTOR DETAIL ======== -->
199
200<A NAME="constructor_detail"><!-- --></A>
201<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
203<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
204<B>Constructor Detail</B></FONT></TH>
205</TR>
206</TABLE>
207
208<A NAME="Base64()"><!-- --></A><H3>
209Base64</H3>
210<PRE>
211public <B>Base64</B>()</PRE>
212<DL>
213</DL>
214
215<!-- ============ METHOD DETAIL ========== -->
216
217<A NAME="method_detail"><!-- --></A>
218<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
219<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
220<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
221<B>Method Detail</B></FONT></TH>
222</TR>
223</TABLE>
224
225<A NAME="encode(byte[])"><!-- --></A><H3>
226encode</H3>
227<PRE>
228public static byte[] <B>encode</B>(byte[]&nbsp;data)</PRE>
229<DL>
230<DD>encode the input data producing a base 64 encoded byte array.
231<P>
232<DD><DL>
233
234<DT><B>Returns:</B><DD>a byte array containing the base 64 encoded data.</DL>
235</DD>
236</DL>
237<HR>
238
239<A NAME="encode(byte[], java.io.OutputStream)"><!-- --></A><H3>
240encode</H3>
241<PRE>
242public static int <B>encode</B>(byte[]&nbsp;data,
243                         java.io.OutputStream&nbsp;out)
244                  throws java.io.IOException</PRE>
245<DL>
246<DD>Encode the byte data to base 64 writing it to the given output stream.
247<P>
248<DD><DL>
249
250<DT><B>Returns:</B><DD>the number of bytes produced.
251<DT><B>Throws:</B>
252<DD><CODE>java.io.IOException</CODE></DL>
253</DD>
254</DL>
255<HR>
256
257<A NAME="encode(byte[], int, int, java.io.OutputStream)"><!-- --></A><H3>
258encode</H3>
259<PRE>
260public static int <B>encode</B>(byte[]&nbsp;data,
261                         int&nbsp;off,
262                         int&nbsp;length,
263                         java.io.OutputStream&nbsp;out)
264                  throws java.io.IOException</PRE>
265<DL>
266<DD>Encode the byte data to base 64 writing it to the given output stream.
267<P>
268<DD><DL>
269
270<DT><B>Returns:</B><DD>the number of bytes produced.
271<DT><B>Throws:</B>
272<DD><CODE>java.io.IOException</CODE></DL>
273</DD>
274</DL>
275<HR>
276
277<A NAME="decode(byte[])"><!-- --></A><H3>
278decode</H3>
279<PRE>
280public static byte[] <B>decode</B>(byte[]&nbsp;data)</PRE>
281<DL>
282<DD>decode the base 64 encoded input data. It is assumed the input data is valid.
283<P>
284<DD><DL>
285
286<DT><B>Returns:</B><DD>a byte array representing the decoded data.</DL>
287</DD>
288</DL>
289<HR>
290
291<A NAME="decode(java.lang.String)"><!-- --></A><H3>
292decode</H3>
293<PRE>
294public static byte[] <B>decode</B>(java.lang.String&nbsp;data)</PRE>
295<DL>
296<DD>decode the base 64 encoded String data - whitespace will be ignored.
297<P>
298<DD><DL>
299
300<DT><B>Returns:</B><DD>a byte array representing the decoded data.</DL>
301</DD>
302</DL>
303<HR>
304
305<A NAME="decode(java.lang.String, java.io.OutputStream)"><!-- --></A><H3>
306decode</H3>
307<PRE>
308public static int <B>decode</B>(java.lang.String&nbsp;data,
309                         java.io.OutputStream&nbsp;out)
310                  throws java.io.IOException</PRE>
311<DL>
312<DD>decode the base 64 encoded String data writing it to the given output stream,
313 whitespace characters will be ignored.
314<P>
315<DD><DL>
316
317<DT><B>Returns:</B><DD>the number of bytes produced.
318<DT><B>Throws:</B>
319<DD><CODE>java.io.IOException</CODE></DL>
320</DD>
321</DL>
322<!-- ========= END OF CLASS DATA ========= -->
323<HR>
324
325
326<!-- ======= START OF BOTTOM NAVBAR ====== -->
327<A NAME="navbar_bottom"><!-- --></A>
328<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
329<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
330<TR>
331<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
332<A NAME="navbar_bottom_firstrow"><!-- --></A>
333<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
334  <TR ALIGN="center" VALIGN="top">
335  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
336  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
337  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
338  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
339  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
340  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
341  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
342  </TR>
343</TABLE>
344</TD>
345<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
346<b>Bouncy Castle Cryptography Library 1.45</b></EM>
347</TD>
348</TR>
349
350<TR>
351<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
352&nbsp;PREV CLASS&nbsp;
353&nbsp;<A HREF="../../../../org/bouncycastle/util/encoders/Base64Encoder.html" title="class in org.bouncycastle.util.encoders"><B>NEXT CLASS</B></A></FONT></TD>
354<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
355  <A HREF="../../../../index.html?org/bouncycastle/util/encoders/Base64.html" target="_top"><B>FRAMES</B></A>  &nbsp;
356&nbsp;<A HREF="Base64.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
357&nbsp;<SCRIPT type="text/javascript">
358  <!--
359  if(window==top) {
360    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
361  }
362  //-->
363</SCRIPT>
364<NOSCRIPT>
365  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
366</NOSCRIPT>
367
368
369</FONT></TD>
370</TR>
371<TR>
372<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
373  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
374<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
375DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
376</TR>
377</TABLE>
378<A NAME="skip-navbar_bottom"></A>
379<!-- ======== END OF BOTTOM NAVBAR ======= -->
380
381<HR>
382
383</BODY>
384</HTML>