ProxyInputStream.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <title>ProxyInputStream (Apache Commons IO 2.6 API)</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="ProxyInputStream (Apache Commons IO 2.6 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../../overview-summary.html">Overview</a></li>
  41. <li><a href="package-summary.html">Package</a></li>
  42. <li class="navBarCell1Rev">Class</li>
  43. <li><a href="class-use/ProxyInputStream.html">Use</a></li>
  44. <li><a href="package-tree.html">Tree</a></li>
  45. <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
  46. <li><a href="../../../../../index-all.html">Index</a></li>
  47. <li><a href="../../../../../help-doc.html">Help</a></li>
  48. </ul>
  49. </div>
  50. <div class="subNav">
  51. <ul class="navList">
  52. <li><a href="../../../../../org/apache/commons/io/input/ObservableInputStream.Observer.html" title="class in org.apache.commons.io.input"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  53. <li><a href="../../../../../org/apache/commons/io/input/ProxyReader.html" title="class in org.apache.commons.io.input"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  54. </ul>
  55. <ul class="navList">
  56. <li><a href="../../../../../index.html?org/apache/commons/io/input/ProxyInputStream.html" target="_top">Frames</a></li>
  57. <li><a href="ProxyInputStream.html" target="_top">No&nbsp;Frames</a></li>
  58. </ul>
  59. <ul class="navList" id="allclasses_navbar_top">
  60. <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  61. </ul>
  62. <div>
  63. <script type="text/javascript"><!--
  64. allClassesLink = document.getElementById("allclasses_navbar_top");
  65. if(window==top) {
  66. allClassesLink.style.display = "block";
  67. }
  68. else {
  69. allClassesLink.style.display = "none";
  70. }
  71. //-->
  72. </script>
  73. </div>
  74. <div>
  75. <ul class="subNavList">
  76. <li>Summary:&nbsp;</li>
  77. <li>Nested&nbsp;|&nbsp;</li>
  78. <li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a>&nbsp;|&nbsp;</li>
  79. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  80. <li><a href="#method.summary">Method</a></li>
  81. </ul>
  82. <ul class="subNavList">
  83. <li>Detail:&nbsp;</li>
  84. <li>Field&nbsp;|&nbsp;</li>
  85. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  86. <li><a href="#method.detail">Method</a></li>
  87. </ul>
  88. </div>
  89. <a name="skip.navbar.top">
  90. <!-- -->
  91. </a></div>
  92. <!-- ========= END OF TOP NAVBAR ========= -->
  93. <!-- ======== START OF CLASS DATA ======== -->
  94. <div class="header">
  95. <div class="subTitle">org.apache.commons.io.input</div>
  96. <h2 title="Class ProxyInputStream" class="title">Class ProxyInputStream</h2>
  97. </div>
  98. <div class="contentContainer">
  99. <ul class="inheritance">
  100. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  101. <li>
  102. <ul class="inheritance">
  103. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</a></li>
  104. <li>
  105. <ul class="inheritance">
  106. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterInputStream</a></li>
  107. <li>
  108. <ul class="inheritance">
  109. <li>org.apache.commons.io.input.ProxyInputStream</li>
  110. </ul>
  111. </li>
  112. </ul>
  113. </li>
  114. </ul>
  115. </li>
  116. </ul>
  117. <div class="description">
  118. <ul class="blockList">
  119. <li class="blockList">
  120. <dl>
  121. <dt>All Implemented Interfaces:</dt>
  122. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
  123. </dl>
  124. <dl>
  125. <dt>Direct Known Subclasses:</dt>
  126. <dd><a href="../../../../../org/apache/commons/io/input/AutoCloseInputStream.html" title="class in org.apache.commons.io.input">AutoCloseInputStream</a>, <a href="../../../../../org/apache/commons/io/input/BOMInputStream.html" title="class in org.apache.commons.io.input">BOMInputStream</a>, <a href="../../../../../org/apache/commons/io/input/CloseShieldInputStream.html" title="class in org.apache.commons.io.input">CloseShieldInputStream</a>, <a href="../../../../../org/apache/commons/io/input/CountingInputStream.html" title="class in org.apache.commons.io.input">CountingInputStream</a>, <a href="../../../../../org/apache/commons/io/input/ObservableInputStream.html" title="class in org.apache.commons.io.input">ObservableInputStream</a>, <a href="../../../../../org/apache/commons/io/input/SwappedDataInputStream.html" title="class in org.apache.commons.io.input">SwappedDataInputStream</a>, <a href="../../../../../org/apache/commons/io/input/TaggedInputStream.html" title="class in org.apache.commons.io.input">TaggedInputStream</a>, <a href="../../../../../org/apache/commons/io/input/TeeInputStream.html" title="class in org.apache.commons.io.input">TeeInputStream</a></dd>
  127. </dl>
  128. <hr>
  129. <br>
  130. <pre>public abstract class <span class="typeNameLabel">ProxyInputStream</span>
  131. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></pre>
  132. <div class="block">A Proxy stream which acts as expected, that is it passes the method
  133. calls on to the proxied stream and doesn't change which methods are
  134. being called.
  135. <p>
  136. It is an alternative base class to FilterInputStream
  137. to increase reusability, because FilterInputStream changes the
  138. methods being called, such as read(byte[]) to read(byte[], int, int).
  139. <p>
  140. See the protected methods for ways in which a subclass can easily decorate
  141. a stream with custom pre-, post- or error processing functionality.</div>
  142. </li>
  143. </ul>
  144. </div>
  145. <div class="summary">
  146. <ul class="blockList">
  147. <li class="blockList">
  148. <!-- =========== FIELD SUMMARY =========== -->
  149. <ul class="blockList">
  150. <li class="blockList"><a name="field.summary">
  151. <!-- -->
  152. </a>
  153. <h3>Field Summary</h3>
  154. <ul class="blockList">
  155. <li class="blockList"><a name="fields.inherited.from.class.java.io.FilterInputStream">
  156. <!-- -->
  157. </a>
  158. <h3>Fields inherited from class&nbsp;java.io.<a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3>
  159. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#in" title="class or interface in java.io">in</a></code></li>
  160. </ul>
  161. </li>
  162. </ul>
  163. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  164. <ul class="blockList">
  165. <li class="blockList"><a name="constructor.summary">
  166. <!-- -->
  167. </a>
  168. <h3>Constructor Summary</h3>
  169. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  170. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  171. <tr>
  172. <th class="colOne" scope="col">Constructor and Description</th>
  173. </tr>
  174. <tr class="altColor">
  175. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#ProxyInputStream-java.io.InputStream-">ProxyInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;proxy)</code>
  176. <div class="block">Constructs a new ProxyInputStream.</div>
  177. </td>
  178. </tr>
  179. </table>
  180. </li>
  181. </ul>
  182. <!-- ========== METHOD SUMMARY =========== -->
  183. <ul class="blockList">
  184. <li class="blockList"><a name="method.summary">
  185. <!-- -->
  186. </a>
  187. <h3>Method Summary</h3>
  188. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  189. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  190. <tr>
  191. <th class="colFirst" scope="col">Modifier and Type</th>
  192. <th class="colLast" scope="col">Method and Description</th>
  193. </tr>
  194. <tr id="i0" class="altColor">
  195. <td class="colFirst"><code>protected void</code></td>
  196. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#afterRead-int-">afterRead</a></span>(int&nbsp;n)</code>
  197. <div class="block">Invoked by the read methods after the proxied call has returned
  198. successfully.</div>
  199. </td>
  200. </tr>
  201. <tr id="i1" class="rowColor">
  202. <td class="colFirst"><code>int</code></td>
  203. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#available--">available</a></span>()</code>
  204. <div class="block">Invokes the delegate's <code>available()</code> method.</div>
  205. </td>
  206. </tr>
  207. <tr id="i2" class="altColor">
  208. <td class="colFirst"><code>protected void</code></td>
  209. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#beforeRead-int-">beforeRead</a></span>(int&nbsp;n)</code>
  210. <div class="block">Invoked by the read methods before the call is proxied.</div>
  211. </td>
  212. </tr>
  213. <tr id="i3" class="rowColor">
  214. <td class="colFirst"><code>void</code></td>
  215. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#close--">close</a></span>()</code>
  216. <div class="block">Invokes the delegate's <code>close()</code> method.</div>
  217. </td>
  218. </tr>
  219. <tr id="i4" class="altColor">
  220. <td class="colFirst"><code>protected void</code></td>
  221. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#handleIOException-java.io.IOException-">handleIOException</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>&nbsp;e)</code>
  222. <div class="block">Handle any IOExceptions thrown.</div>
  223. </td>
  224. </tr>
  225. <tr id="i5" class="rowColor">
  226. <td class="colFirst"><code>void</code></td>
  227. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#mark-int-">mark</a></span>(int&nbsp;readlimit)</code>
  228. <div class="block">Invokes the delegate's <code>mark(int)</code> method.</div>
  229. </td>
  230. </tr>
  231. <tr id="i6" class="altColor">
  232. <td class="colFirst"><code>boolean</code></td>
  233. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#markSupported--">markSupported</a></span>()</code>
  234. <div class="block">Invokes the delegate's <code>markSupported()</code> method.</div>
  235. </td>
  236. </tr>
  237. <tr id="i7" class="rowColor">
  238. <td class="colFirst"><code>int</code></td>
  239. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#read--">read</a></span>()</code>
  240. <div class="block">Invokes the delegate's <code>read()</code> method.</div>
  241. </td>
  242. </tr>
  243. <tr id="i8" class="altColor">
  244. <td class="colFirst"><code>int</code></td>
  245. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#read-byte:A-">read</a></span>(byte[]&nbsp;bts)</code>
  246. <div class="block">Invokes the delegate's <code>read(byte[])</code> method.</div>
  247. </td>
  248. </tr>
  249. <tr id="i9" class="rowColor">
  250. <td class="colFirst"><code>int</code></td>
  251. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#read-byte:A-int-int-">read</a></span>(byte[]&nbsp;bts,
  252. int&nbsp;off,
  253. int&nbsp;len)</code>
  254. <div class="block">Invokes the delegate's <code>read(byte[], int, int)</code> method.</div>
  255. </td>
  256. </tr>
  257. <tr id="i10" class="altColor">
  258. <td class="colFirst"><code>void</code></td>
  259. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#reset--">reset</a></span>()</code>
  260. <div class="block">Invokes the delegate's <code>reset()</code> method.</div>
  261. </td>
  262. </tr>
  263. <tr id="i11" class="rowColor">
  264. <td class="colFirst"><code>long</code></td>
  265. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#skip-long-">skip</a></span>(long&nbsp;ln)</code>
  266. <div class="block">Invokes the delegate's <code>skip(long)</code> method.</div>
  267. </td>
  268. </tr>
  269. </table>
  270. <ul class="blockList">
  271. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  272. <!-- -->
  273. </a>
  274. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  275. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
  276. </ul>
  277. </li>
  278. </ul>
  279. </li>
  280. </ul>
  281. </div>
  282. <div class="details">
  283. <ul class="blockList">
  284. <li class="blockList">
  285. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  286. <ul class="blockList">
  287. <li class="blockList"><a name="constructor.detail">
  288. <!-- -->
  289. </a>
  290. <h3>Constructor Detail</h3>
  291. <a name="ProxyInputStream-java.io.InputStream-">
  292. <!-- -->
  293. </a>
  294. <ul class="blockListLast">
  295. <li class="blockList">
  296. <h4>ProxyInputStream</h4>
  297. <pre>public&nbsp;ProxyInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;proxy)</pre>
  298. <div class="block">Constructs a new ProxyInputStream.</div>
  299. <dl>
  300. <dt><span class="paramLabel">Parameters:</span></dt>
  301. <dd><code>proxy</code> - the InputStream to delegate to</dd>
  302. </dl>
  303. </li>
  304. </ul>
  305. </li>
  306. </ul>
  307. <!-- ============ METHOD DETAIL ========== -->
  308. <ul class="blockList">
  309. <li class="blockList"><a name="method.detail">
  310. <!-- -->
  311. </a>
  312. <h3>Method Detail</h3>
  313. <a name="read--">
  314. <!-- -->
  315. </a>
  316. <ul class="blockList">
  317. <li class="blockList">
  318. <h4>read</h4>
  319. <pre>public&nbsp;int&nbsp;read()
  320. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  321. <div class="block">Invokes the delegate's <code>read()</code> method.</div>
  322. <dl>
  323. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  324. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read--" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  325. <dt><span class="returnLabel">Returns:</span></dt>
  326. <dd>the byte read or -1 if the end of stream</dd>
  327. <dt><span class="throwsLabel">Throws:</span></dt>
  328. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  329. </dl>
  330. </li>
  331. </ul>
  332. <a name="read-byte:A-">
  333. <!-- -->
  334. </a>
  335. <ul class="blockList">
  336. <li class="blockList">
  337. <h4>read</h4>
  338. <pre>public&nbsp;int&nbsp;read(byte[]&nbsp;bts)
  339. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  340. <div class="block">Invokes the delegate's <code>read(byte[])</code> method.</div>
  341. <dl>
  342. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  343. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read-byte:A-" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  344. <dt><span class="paramLabel">Parameters:</span></dt>
  345. <dd><code>bts</code> - the buffer to read the bytes into</dd>
  346. <dt><span class="returnLabel">Returns:</span></dt>
  347. <dd>the number of bytes read or EOF if the end of stream</dd>
  348. <dt><span class="throwsLabel">Throws:</span></dt>
  349. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  350. </dl>
  351. </li>
  352. </ul>
  353. <a name="read-byte:A-int-int-">
  354. <!-- -->
  355. </a>
  356. <ul class="blockList">
  357. <li class="blockList">
  358. <h4>read</h4>
  359. <pre>public&nbsp;int&nbsp;read(byte[]&nbsp;bts,
  360. int&nbsp;off,
  361. int&nbsp;len)
  362. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  363. <div class="block">Invokes the delegate's <code>read(byte[], int, int)</code> method.</div>
  364. <dl>
  365. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  366. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  367. <dt><span class="paramLabel">Parameters:</span></dt>
  368. <dd><code>bts</code> - the buffer to read the bytes into</dd>
  369. <dd><code>off</code> - The start offset</dd>
  370. <dd><code>len</code> - The number of bytes to read</dd>
  371. <dt><span class="returnLabel">Returns:</span></dt>
  372. <dd>the number of bytes read or -1 if the end of stream</dd>
  373. <dt><span class="throwsLabel">Throws:</span></dt>
  374. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  375. </dl>
  376. </li>
  377. </ul>
  378. <a name="skip-long-">
  379. <!-- -->
  380. </a>
  381. <ul class="blockList">
  382. <li class="blockList">
  383. <h4>skip</h4>
  384. <pre>public&nbsp;long&nbsp;skip(long&nbsp;ln)
  385. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  386. <div class="block">Invokes the delegate's <code>skip(long)</code> method.</div>
  387. <dl>
  388. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  389. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#skip-long-" title="class or interface in java.io">skip</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  390. <dt><span class="paramLabel">Parameters:</span></dt>
  391. <dd><code>ln</code> - the number of bytes to skip</dd>
  392. <dt><span class="returnLabel">Returns:</span></dt>
  393. <dd>the actual number of bytes skipped</dd>
  394. <dt><span class="throwsLabel">Throws:</span></dt>
  395. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  396. </dl>
  397. </li>
  398. </ul>
  399. <a name="available--">
  400. <!-- -->
  401. </a>
  402. <ul class="blockList">
  403. <li class="blockList">
  404. <h4>available</h4>
  405. <pre>public&nbsp;int&nbsp;available()
  406. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  407. <div class="block">Invokes the delegate's <code>available()</code> method.</div>
  408. <dl>
  409. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  410. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#available--" title="class or interface in java.io">available</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  411. <dt><span class="returnLabel">Returns:</span></dt>
  412. <dd>the number of available bytes</dd>
  413. <dt><span class="throwsLabel">Throws:</span></dt>
  414. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  415. </dl>
  416. </li>
  417. </ul>
  418. <a name="close--">
  419. <!-- -->
  420. </a>
  421. <ul class="blockList">
  422. <li class="blockList">
  423. <h4>close</h4>
  424. <pre>public&nbsp;void&nbsp;close()
  425. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  426. <div class="block">Invokes the delegate's <code>close()</code> method.</div>
  427. <dl>
  428. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  429. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
  430. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  431. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
  432. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  433. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#close--" title="class or interface in java.io">close</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  434. <dt><span class="throwsLabel">Throws:</span></dt>
  435. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  436. </dl>
  437. </li>
  438. </ul>
  439. <a name="mark-int-">
  440. <!-- -->
  441. </a>
  442. <ul class="blockList">
  443. <li class="blockList">
  444. <h4>mark</h4>
  445. <pre>public&nbsp;void&nbsp;mark(int&nbsp;readlimit)</pre>
  446. <div class="block">Invokes the delegate's <code>mark(int)</code> method.</div>
  447. <dl>
  448. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  449. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#mark-int-" title="class or interface in java.io">mark</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  450. <dt><span class="paramLabel">Parameters:</span></dt>
  451. <dd><code>readlimit</code> - read ahead limit</dd>
  452. </dl>
  453. </li>
  454. </ul>
  455. <a name="reset--">
  456. <!-- -->
  457. </a>
  458. <ul class="blockList">
  459. <li class="blockList">
  460. <h4>reset</h4>
  461. <pre>public&nbsp;void&nbsp;reset()
  462. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  463. <div class="block">Invokes the delegate's <code>reset()</code> method.</div>
  464. <dl>
  465. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  466. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#reset--" title="class or interface in java.io">reset</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  467. <dt><span class="throwsLabel">Throws:</span></dt>
  468. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  469. </dl>
  470. </li>
  471. </ul>
  472. <a name="markSupported--">
  473. <!-- -->
  474. </a>
  475. <ul class="blockList">
  476. <li class="blockList">
  477. <h4>markSupported</h4>
  478. <pre>public&nbsp;boolean&nbsp;markSupported()</pre>
  479. <div class="block">Invokes the delegate's <code>markSupported()</code> method.</div>
  480. <dl>
  481. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  482. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#markSupported--" title="class or interface in java.io">markSupported</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd>
  483. <dt><span class="returnLabel">Returns:</span></dt>
  484. <dd>true if mark is supported, otherwise false</dd>
  485. </dl>
  486. </li>
  487. </ul>
  488. <a name="beforeRead-int-">
  489. <!-- -->
  490. </a>
  491. <ul class="blockList">
  492. <li class="blockList">
  493. <h4>beforeRead</h4>
  494. <pre>protected&nbsp;void&nbsp;beforeRead(int&nbsp;n)
  495. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  496. <div class="block">Invoked by the read methods before the call is proxied. The number
  497. of bytes that the caller wanted to read (1 for the <a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#read--"><code>read()</code></a>
  498. method, buffer length for <a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#read-byte:A-"><code>read(byte[])</code></a>, etc.) is given as
  499. an argument.
  500. <p>
  501. Subclasses can override this method to add common pre-processing
  502. functionality without having to override all the read methods.
  503. The default implementation does nothing.
  504. <p>
  505. Note this method is <em>not</em> called from <a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#skip-long-"><code>skip(long)</code></a> or
  506. <a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#reset--"><code>reset()</code></a>. You need to explicitly override those methods if
  507. you want to add pre-processing steps also to them.</div>
  508. <dl>
  509. <dt><span class="paramLabel">Parameters:</span></dt>
  510. <dd><code>n</code> - number of bytes that the caller asked to be read</dd>
  511. <dt><span class="throwsLabel">Throws:</span></dt>
  512. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the pre-processing fails</dd>
  513. <dt><span class="simpleTagLabel">Since:</span></dt>
  514. <dd>2.0</dd>
  515. </dl>
  516. </li>
  517. </ul>
  518. <a name="afterRead-int-">
  519. <!-- -->
  520. </a>
  521. <ul class="blockList">
  522. <li class="blockList">
  523. <h4>afterRead</h4>
  524. <pre>protected&nbsp;void&nbsp;afterRead(int&nbsp;n)
  525. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  526. <div class="block">Invoked by the read methods after the proxied call has returned
  527. successfully. The number of bytes returned to the caller (or -1 if
  528. the end of stream was reached) is given as an argument.
  529. <p>
  530. Subclasses can override this method to add common post-processing
  531. functionality without having to override all the read methods.
  532. The default implementation does nothing.
  533. <p>
  534. Note this method is <em>not</em> called from <a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#skip-long-"><code>skip(long)</code></a> or
  535. <a href="../../../../../org/apache/commons/io/input/ProxyInputStream.html#reset--"><code>reset()</code></a>. You need to explicitly override those methods if
  536. you want to add post-processing steps also to them.</div>
  537. <dl>
  538. <dt><span class="paramLabel">Parameters:</span></dt>
  539. <dd><code>n</code> - number of bytes read, or -1 if the end of stream was reached</dd>
  540. <dt><span class="throwsLabel">Throws:</span></dt>
  541. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the post-processing fails</dd>
  542. <dt><span class="simpleTagLabel">Since:</span></dt>
  543. <dd>2.0</dd>
  544. </dl>
  545. </li>
  546. </ul>
  547. <a name="handleIOException-java.io.IOException-">
  548. <!-- -->
  549. </a>
  550. <ul class="blockListLast">
  551. <li class="blockList">
  552. <h4>handleIOException</h4>
  553. <pre>protected&nbsp;void&nbsp;handleIOException(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>&nbsp;e)
  554. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  555. <div class="block">Handle any IOExceptions thrown.
  556. <p>
  557. This method provides a point to implement custom exception
  558. handling. The default behaviour is to re-throw the exception.</div>
  559. <dl>
  560. <dt><span class="paramLabel">Parameters:</span></dt>
  561. <dd><code>e</code> - The IOException thrown</dd>
  562. <dt><span class="throwsLabel">Throws:</span></dt>
  563. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd>
  564. <dt><span class="simpleTagLabel">Since:</span></dt>
  565. <dd>2.0</dd>
  566. </dl>
  567. </li>
  568. </ul>
  569. </li>
  570. </ul>
  571. </li>
  572. </ul>
  573. </div>
  574. </div>
  575. <!-- ========= END OF CLASS DATA ========= -->
  576. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  577. <div class="bottomNav"><a name="navbar.bottom">
  578. <!-- -->
  579. </a>
  580. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  581. <a name="navbar.bottom.firstrow">
  582. <!-- -->
  583. </a>
  584. <ul class="navList" title="Navigation">
  585. <li><a href="../../../../../overview-summary.html">Overview</a></li>
  586. <li><a href="package-summary.html">Package</a></li>
  587. <li class="navBarCell1Rev">Class</li>
  588. <li><a href="class-use/ProxyInputStream.html">Use</a></li>
  589. <li><a href="package-tree.html">Tree</a></li>
  590. <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
  591. <li><a href="../../../../../index-all.html">Index</a></li>
  592. <li><a href="../../../../../help-doc.html">Help</a></li>
  593. </ul>
  594. </div>
  595. <div class="subNav">
  596. <ul class="navList">
  597. <li><a href="../../../../../org/apache/commons/io/input/ObservableInputStream.Observer.html" title="class in org.apache.commons.io.input"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  598. <li><a href="../../../../../org/apache/commons/io/input/ProxyReader.html" title="class in org.apache.commons.io.input"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  599. </ul>
  600. <ul class="navList">
  601. <li><a href="../../../../../index.html?org/apache/commons/io/input/ProxyInputStream.html" target="_top">Frames</a></li>
  602. <li><a href="ProxyInputStream.html" target="_top">No&nbsp;Frames</a></li>
  603. </ul>
  604. <ul class="navList" id="allclasses_navbar_bottom">
  605. <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  606. </ul>
  607. <div>
  608. <script type="text/javascript"><!--
  609. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  610. if(window==top) {
  611. allClassesLink.style.display = "block";
  612. }
  613. else {
  614. allClassesLink.style.display = "none";
  615. }
  616. //-->
  617. </script>
  618. </div>
  619. <div>
  620. <ul class="subNavList">
  621. <li>Summary:&nbsp;</li>
  622. <li>Nested&nbsp;|&nbsp;</li>
  623. <li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a>&nbsp;|&nbsp;</li>
  624. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  625. <li><a href="#method.summary">Method</a></li>
  626. </ul>
  627. <ul class="subNavList">
  628. <li>Detail:&nbsp;</li>
  629. <li>Field&nbsp;|&nbsp;</li>
  630. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  631. <li><a href="#method.detail">Method</a></li>
  632. </ul>
  633. </div>
  634. <a name="skip.navbar.bottom">
  635. <!-- -->
  636. </a></div>
  637. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  638. <p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  639. </body>
  640. </html>