/lib/bouncycastle/docs/org/bouncycastle/util/io/Streams.html

https://bitbucket.org/arkban/somersault · HTML · 401 lines · 329 code · 50 blank · 22 comment · 0 complexity · e3cf55868c847fa4c656b65662cfdca4 MD5 · raw file

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