NullReader.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  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>NullReader (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="NullReader (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/NullReader.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/NullInputStream.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/ObservableInputStream.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/NullReader.html" target="_top">Frames</a></li>
  57. <li><a href="NullReader.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.Reader">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 NullReader" class="title">Class NullReader</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/Reader.html?is-external=true" title="class or interface in java.io">java.io.Reader</a></li>
  104. <li>
  105. <ul class="inheritance">
  106. <li>org.apache.commons.io.input.NullReader</li>
  107. </ul>
  108. </li>
  109. </ul>
  110. </li>
  111. </ul>
  112. <div class="description">
  113. <ul class="blockList">
  114. <li class="blockList">
  115. <dl>
  116. <dt>All Implemented Interfaces:</dt>
  117. <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>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Readable.html?is-external=true" title="class or interface in java.lang">Readable</a></dd>
  118. </dl>
  119. <hr>
  120. <br>
  121. <pre>public class <span class="typeNameLabel">NullReader</span>
  122. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></pre>
  123. <div class="block">A functional, light weight <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> that emulates
  124. a reader of a specified size.
  125. <p>
  126. This implementation provides a light weight
  127. object for testing with an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>
  128. where the contents don't matter.
  129. <p>
  130. One use case would be for testing the handling of
  131. large <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> as it can emulate that
  132. scenario without the overhead of actually processing
  133. large numbers of characters - significantly speeding up
  134. test execution times.
  135. <p>
  136. This implementation returns a space from the method that
  137. reads a character and leaves the array unchanged in the read
  138. methods that are passed a character array.
  139. If alternative data is required the <code>processChar()</code> and
  140. <code>processChars()</code> methods can be implemented to generate
  141. data, for example:
  142. <pre>
  143. public class TestReader extends NullReader {
  144. public TestReader(int size) {
  145. super(size);
  146. }
  147. protected char processChar() {
  148. return ... // return required value here
  149. }
  150. protected void processChars(char[] chars, int offset, int length) {
  151. for (int i = offset; i &lt; length; i++) {
  152. chars[i] = ... // set array value here
  153. }
  154. }
  155. }
  156. </pre></div>
  157. <dl>
  158. <dt><span class="simpleTagLabel">Since:</span></dt>
  159. <dd>1.3</dd>
  160. <dt><span class="simpleTagLabel">Version:</span></dt>
  161. <dd>$Id$</dd>
  162. </dl>
  163. </li>
  164. </ul>
  165. </div>
  166. <div class="summary">
  167. <ul class="blockList">
  168. <li class="blockList">
  169. <!-- =========== FIELD SUMMARY =========== -->
  170. <ul class="blockList">
  171. <li class="blockList"><a name="field.summary">
  172. <!-- -->
  173. </a>
  174. <h3>Field Summary</h3>
  175. <ul class="blockList">
  176. <li class="blockList"><a name="fields.inherited.from.class.java.io.Reader">
  177. <!-- -->
  178. </a>
  179. <h3>Fields inherited from class&nbsp;java.io.<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></h3>
  180. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#lock" title="class or interface in java.io">lock</a></code></li>
  181. </ul>
  182. </li>
  183. </ul>
  184. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  185. <ul class="blockList">
  186. <li class="blockList"><a name="constructor.summary">
  187. <!-- -->
  188. </a>
  189. <h3>Constructor Summary</h3>
  190. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  191. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  192. <tr>
  193. <th class="colOne" scope="col">Constructor and Description</th>
  194. </tr>
  195. <tr class="altColor">
  196. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#NullReader-long-">NullReader</a></span>(long&nbsp;size)</code>
  197. <div class="block">Create a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> that emulates a specified size
  198. which supports marking and does not throw EOFException.</div>
  199. </td>
  200. </tr>
  201. <tr class="rowColor">
  202. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#NullReader-long-boolean-boolean-">NullReader</a></span>(long&nbsp;size,
  203. boolean&nbsp;markSupported,
  204. boolean&nbsp;throwEofException)</code>
  205. <div class="block">Create a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> that emulates a specified
  206. size with option settings.</div>
  207. </td>
  208. </tr>
  209. </table>
  210. </li>
  211. </ul>
  212. <!-- ========== METHOD SUMMARY =========== -->
  213. <ul class="blockList">
  214. <li class="blockList"><a name="method.summary">
  215. <!-- -->
  216. </a>
  217. <h3>Method Summary</h3>
  218. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  219. <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>
  220. <tr>
  221. <th class="colFirst" scope="col">Modifier and Type</th>
  222. <th class="colLast" scope="col">Method and Description</th>
  223. </tr>
  224. <tr id="i0" class="altColor">
  225. <td class="colFirst"><code>void</code></td>
  226. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#close--">close</a></span>()</code>
  227. <div class="block">Close this Reader - resets the internal state to
  228. the initial values.</div>
  229. </td>
  230. </tr>
  231. <tr id="i1" class="rowColor">
  232. <td class="colFirst"><code>long</code></td>
  233. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#getPosition--">getPosition</a></span>()</code>
  234. <div class="block">Return the current position.</div>
  235. </td>
  236. </tr>
  237. <tr id="i2" class="altColor">
  238. <td class="colFirst"><code>long</code></td>
  239. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#getSize--">getSize</a></span>()</code>
  240. <div class="block">Return the size this <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> emulates.</div>
  241. </td>
  242. </tr>
  243. <tr id="i3" class="rowColor">
  244. <td class="colFirst"><code>void</code></td>
  245. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#mark-int-">mark</a></span>(int&nbsp;readlimit)</code>
  246. <div class="block">Mark the current position.</div>
  247. </td>
  248. </tr>
  249. <tr id="i4" class="altColor">
  250. <td class="colFirst"><code>boolean</code></td>
  251. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#markSupported--">markSupported</a></span>()</code>
  252. <div class="block">Indicates whether <i>mark</i> is supported.</div>
  253. </td>
  254. </tr>
  255. <tr id="i5" class="rowColor">
  256. <td class="colFirst"><code>protected int</code></td>
  257. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#processChar--">processChar</a></span>()</code>
  258. <div class="block">Return a character value for the <code>read()</code> method.</div>
  259. </td>
  260. </tr>
  261. <tr id="i6" class="altColor">
  262. <td class="colFirst"><code>protected void</code></td>
  263. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#processChars-char:A-int-int-">processChars</a></span>(char[]&nbsp;chars,
  264. int&nbsp;offset,
  265. int&nbsp;length)</code>
  266. <div class="block">Process the characters for the <code>read(char[], offset, length)</code>
  267. method.</div>
  268. </td>
  269. </tr>
  270. <tr id="i7" class="rowColor">
  271. <td class="colFirst"><code>int</code></td>
  272. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#read--">read</a></span>()</code>
  273. <div class="block">Read a character.</div>
  274. </td>
  275. </tr>
  276. <tr id="i8" class="altColor">
  277. <td class="colFirst"><code>int</code></td>
  278. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#read-char:A-">read</a></span>(char[]&nbsp;chars)</code>
  279. <div class="block">Read some characters into the specified array.</div>
  280. </td>
  281. </tr>
  282. <tr id="i9" class="rowColor">
  283. <td class="colFirst"><code>int</code></td>
  284. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#read-char:A-int-int-">read</a></span>(char[]&nbsp;chars,
  285. int&nbsp;offset,
  286. int&nbsp;length)</code>
  287. <div class="block">Read the specified number characters into an array.</div>
  288. </td>
  289. </tr>
  290. <tr id="i10" class="altColor">
  291. <td class="colFirst"><code>void</code></td>
  292. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#reset--">reset</a></span>()</code>
  293. <div class="block">Reset the stream to the point when mark was last called.</div>
  294. </td>
  295. </tr>
  296. <tr id="i11" class="rowColor">
  297. <td class="colFirst"><code>long</code></td>
  298. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/io/input/NullReader.html#skip-long-">skip</a></span>(long&nbsp;numberOfChars)</code>
  299. <div class="block">Skip a specified number of characters.</div>
  300. </td>
  301. </tr>
  302. </table>
  303. <ul class="blockList">
  304. <li class="blockList"><a name="methods.inherited.from.class.java.io.Reader">
  305. <!-- -->
  306. </a>
  307. <h3>Methods inherited from class&nbsp;java.io.<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></h3>
  308. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-java.nio.CharBuffer-" title="class or interface in java.io">read</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#ready--" title="class or interface in java.io">ready</a></code></li>
  309. </ul>
  310. <ul class="blockList">
  311. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  312. <!-- -->
  313. </a>
  314. <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>
  315. <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>
  316. </ul>
  317. </li>
  318. </ul>
  319. </li>
  320. </ul>
  321. </div>
  322. <div class="details">
  323. <ul class="blockList">
  324. <li class="blockList">
  325. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  326. <ul class="blockList">
  327. <li class="blockList"><a name="constructor.detail">
  328. <!-- -->
  329. </a>
  330. <h3>Constructor Detail</h3>
  331. <a name="NullReader-long-">
  332. <!-- -->
  333. </a>
  334. <ul class="blockList">
  335. <li class="blockList">
  336. <h4>NullReader</h4>
  337. <pre>public&nbsp;NullReader(long&nbsp;size)</pre>
  338. <div class="block">Create a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> that emulates a specified size
  339. which supports marking and does not throw EOFException.</div>
  340. <dl>
  341. <dt><span class="paramLabel">Parameters:</span></dt>
  342. <dd><code>size</code> - The size of the reader to emulate.</dd>
  343. </dl>
  344. </li>
  345. </ul>
  346. <a name="NullReader-long-boolean-boolean-">
  347. <!-- -->
  348. </a>
  349. <ul class="blockListLast">
  350. <li class="blockList">
  351. <h4>NullReader</h4>
  352. <pre>public&nbsp;NullReader(long&nbsp;size,
  353. boolean&nbsp;markSupported,
  354. boolean&nbsp;throwEofException)</pre>
  355. <div class="block">Create a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> that emulates a specified
  356. size with option settings.</div>
  357. <dl>
  358. <dt><span class="paramLabel">Parameters:</span></dt>
  359. <dd><code>size</code> - The size of the reader to emulate.</dd>
  360. <dd><code>markSupported</code> - Whether this instance will support
  361. the <code>mark()</code> functionality.</dd>
  362. <dd><code>throwEofException</code> - Whether this implementation
  363. will throw an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io"><code>EOFException</code></a> or return -1 when the
  364. end of file is reached.</dd>
  365. </dl>
  366. </li>
  367. </ul>
  368. </li>
  369. </ul>
  370. <!-- ============ METHOD DETAIL ========== -->
  371. <ul class="blockList">
  372. <li class="blockList"><a name="method.detail">
  373. <!-- -->
  374. </a>
  375. <h3>Method Detail</h3>
  376. <a name="getPosition--">
  377. <!-- -->
  378. </a>
  379. <ul class="blockList">
  380. <li class="blockList">
  381. <h4>getPosition</h4>
  382. <pre>public&nbsp;long&nbsp;getPosition()</pre>
  383. <div class="block">Return the current position.</div>
  384. <dl>
  385. <dt><span class="returnLabel">Returns:</span></dt>
  386. <dd>the current position.</dd>
  387. </dl>
  388. </li>
  389. </ul>
  390. <a name="getSize--">
  391. <!-- -->
  392. </a>
  393. <ul class="blockList">
  394. <li class="blockList">
  395. <h4>getSize</h4>
  396. <pre>public&nbsp;long&nbsp;getSize()</pre>
  397. <div class="block">Return the size this <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a> emulates.</div>
  398. <dl>
  399. <dt><span class="returnLabel">Returns:</span></dt>
  400. <dd>The size of the reader to emulate.</dd>
  401. </dl>
  402. </li>
  403. </ul>
  404. <a name="close--">
  405. <!-- -->
  406. </a>
  407. <ul class="blockList">
  408. <li class="blockList">
  409. <h4>close</h4>
  410. <pre>public&nbsp;void&nbsp;close()
  411. 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>
  412. <div class="block">Close this Reader - resets the internal state to
  413. the initial values.</div>
  414. <dl>
  415. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  416. <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>
  417. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  418. <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>
  419. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  420. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  421. <dt><span class="throwsLabel">Throws:</span></dt>
  422. <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 error occurs.</dd>
  423. </dl>
  424. </li>
  425. </ul>
  426. <a name="mark-int-">
  427. <!-- -->
  428. </a>
  429. <ul class="blockList">
  430. <li class="blockList">
  431. <h4>mark</h4>
  432. <pre>public&nbsp;void&nbsp;mark(int&nbsp;readlimit)</pre>
  433. <div class="block">Mark the current position.</div>
  434. <dl>
  435. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  436. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  437. <dt><span class="paramLabel">Parameters:</span></dt>
  438. <dd><code>readlimit</code> - The number of characters before this marked position
  439. is invalid.</dd>
  440. <dt><span class="throwsLabel">Throws:</span></dt>
  441. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if mark is not supported.</dd>
  442. </dl>
  443. </li>
  444. </ul>
  445. <a name="markSupported--">
  446. <!-- -->
  447. </a>
  448. <ul class="blockList">
  449. <li class="blockList">
  450. <h4>markSupported</h4>
  451. <pre>public&nbsp;boolean&nbsp;markSupported()</pre>
  452. <div class="block">Indicates whether <i>mark</i> is supported.</div>
  453. <dl>
  454. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  455. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  456. <dt><span class="returnLabel">Returns:</span></dt>
  457. <dd>Whether <i>mark</i> is supported or not.</dd>
  458. </dl>
  459. </li>
  460. </ul>
  461. <a name="read--">
  462. <!-- -->
  463. </a>
  464. <ul class="blockList">
  465. <li class="blockList">
  466. <h4>read</h4>
  467. <pre>public&nbsp;int&nbsp;read()
  468. 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>
  469. <div class="block">Read a character.</div>
  470. <dl>
  471. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  472. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  473. <dt><span class="returnLabel">Returns:</span></dt>
  474. <dd>Either The character value returned by <code>processChar()</code>
  475. or <code>-1</code> if the end of file has been reached and
  476. <code>throwEofException</code> is set to <code>false</code>.</dd>
  477. <dt><span class="throwsLabel">Throws:</span></dt>
  478. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the end of file is reached and
  479. <code>throwEofException</code> is set to <code>true</code>.</dd>
  480. <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 trying to read past the end of file.</dd>
  481. </dl>
  482. </li>
  483. </ul>
  484. <a name="read-char:A-">
  485. <!-- -->
  486. </a>
  487. <ul class="blockList">
  488. <li class="blockList">
  489. <h4>read</h4>
  490. <pre>public&nbsp;int&nbsp;read(char[]&nbsp;chars)
  491. 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>
  492. <div class="block">Read some characters into the specified array.</div>
  493. <dl>
  494. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  495. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char: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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  496. <dt><span class="paramLabel">Parameters:</span></dt>
  497. <dd><code>chars</code> - The character array to read into</dd>
  498. <dt><span class="returnLabel">Returns:</span></dt>
  499. <dd>The number of characters read or <code>-1</code>
  500. if the end of file has been reached and
  501. <code>throwEofException</code> is set to <code>false</code>.</dd>
  502. <dt><span class="throwsLabel">Throws:</span></dt>
  503. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the end of file is reached and
  504. <code>throwEofException</code> is set to <code>true</code>.</dd>
  505. <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 trying to read past the end of file.</dd>
  506. </dl>
  507. </li>
  508. </ul>
  509. <a name="read-char:A-int-int-">
  510. <!-- -->
  511. </a>
  512. <ul class="blockList">
  513. <li class="blockList">
  514. <h4>read</h4>
  515. <pre>public&nbsp;int&nbsp;read(char[]&nbsp;chars,
  516. int&nbsp;offset,
  517. int&nbsp;length)
  518. 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>
  519. <div class="block">Read the specified number characters into an array.</div>
  520. <dl>
  521. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  522. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true#read-char: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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  523. <dt><span class="paramLabel">Parameters:</span></dt>
  524. <dd><code>chars</code> - The character array to read into.</dd>
  525. <dd><code>offset</code> - The offset to start reading characters into.</dd>
  526. <dd><code>length</code> - The number of characters to read.</dd>
  527. <dt><span class="returnLabel">Returns:</span></dt>
  528. <dd>The number of characters read or <code>-1</code>
  529. if the end of file has been reached and
  530. <code>throwEofException</code> is set to <code>false</code>.</dd>
  531. <dt><span class="throwsLabel">Throws:</span></dt>
  532. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the end of file is reached and
  533. <code>throwEofException</code> is set to <code>true</code>.</dd>
  534. <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 trying to read past the end of file.</dd>
  535. </dl>
  536. </li>
  537. </ul>
  538. <a name="reset--">
  539. <!-- -->
  540. </a>
  541. <ul class="blockList">
  542. <li class="blockList">
  543. <h4>reset</h4>
  544. <pre>public&nbsp;void&nbsp;reset()
  545. 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>
  546. <div class="block">Reset the stream to the point when mark was last called.</div>
  547. <dl>
  548. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  549. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  550. <dt><span class="throwsLabel">Throws:</span></dt>
  551. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if mark is not supported.</dd>
  552. <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 no position has been marked
  553. or the read limit has been exceed since the last position was
  554. marked.</dd>
  555. </dl>
  556. </li>
  557. </ul>
  558. <a name="skip-long-">
  559. <!-- -->
  560. </a>
  561. <ul class="blockList">
  562. <li class="blockList">
  563. <h4>skip</h4>
  564. <pre>public&nbsp;long&nbsp;skip(long&nbsp;numberOfChars)
  565. 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>
  566. <div class="block">Skip a specified number of characters.</div>
  567. <dl>
  568. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  569. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.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/Reader.html?is-external=true" title="class or interface in java.io">Reader</a></code></dd>
  570. <dt><span class="paramLabel">Parameters:</span></dt>
  571. <dd><code>numberOfChars</code> - The number of characters to skip.</dd>
  572. <dt><span class="returnLabel">Returns:</span></dt>
  573. <dd>The number of characters skipped or <code>-1</code>
  574. if the end of file has been reached and
  575. <code>throwEofException</code> is set to <code>false</code>.</dd>
  576. <dt><span class="throwsLabel">Throws:</span></dt>
  577. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html?is-external=true" title="class or interface in java.io">EOFException</a></code> - if the end of file is reached and
  578. <code>throwEofException</code> is set to <code>true</code>.</dd>
  579. <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 trying to read past the end of file.</dd>
  580. </dl>
  581. </li>
  582. </ul>
  583. <a name="processChar--">
  584. <!-- -->
  585. </a>
  586. <ul class="blockList">
  587. <li class="blockList">
  588. <h4>processChar</h4>
  589. <pre>protected&nbsp;int&nbsp;processChar()</pre>
  590. <div class="block">Return a character value for the <code>read()</code> method.
  591. <p>
  592. This implementation returns zero.</div>
  593. <dl>
  594. <dt><span class="returnLabel">Returns:</span></dt>
  595. <dd>This implementation always returns zero.</dd>
  596. </dl>
  597. </li>
  598. </ul>
  599. <a name="processChars-char:A-int-int-">
  600. <!-- -->
  601. </a>
  602. <ul class="blockListLast">
  603. <li class="blockList">
  604. <h4>processChars</h4>
  605. <pre>protected&nbsp;void&nbsp;processChars(char[]&nbsp;chars,
  606. int&nbsp;offset,
  607. int&nbsp;length)</pre>
  608. <div class="block">Process the characters for the <code>read(char[], offset, length)</code>
  609. method.
  610. <p>
  611. This implementation leaves the character array unchanged.</div>
  612. <dl>
  613. <dt><span class="paramLabel">Parameters:</span></dt>
  614. <dd><code>chars</code> - The character array</dd>
  615. <dd><code>offset</code> - The offset to start at.</dd>
  616. <dd><code>length</code> - The number of characters.</dd>
  617. </dl>
  618. </li>
  619. </ul>
  620. </li>
  621. </ul>
  622. </li>
  623. </ul>
  624. </div>
  625. </div>
  626. <!-- ========= END OF CLASS DATA ========= -->
  627. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  628. <div class="bottomNav"><a name="navbar.bottom">
  629. <!-- -->
  630. </a>
  631. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  632. <a name="navbar.bottom.firstrow">
  633. <!-- -->
  634. </a>
  635. <ul class="navList" title="Navigation">
  636. <li><a href="../../../../../overview-summary.html">Overview</a></li>
  637. <li><a href="package-summary.html">Package</a></li>
  638. <li class="navBarCell1Rev">Class</li>
  639. <li><a href="class-use/NullReader.html">Use</a></li>
  640. <li><a href="package-tree.html">Tree</a></li>
  641. <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
  642. <li><a href="../../../../../index-all.html">Index</a></li>
  643. <li><a href="../../../../../help-doc.html">Help</a></li>
  644. </ul>
  645. </div>
  646. <div class="subNav">
  647. <ul class="navList">
  648. <li><a href="../../../../../org/apache/commons/io/input/NullInputStream.html" title="class in org.apache.commons.io.input"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  649. <li><a href="../../../../../org/apache/commons/io/input/ObservableInputStream.html" title="class in org.apache.commons.io.input"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  650. </ul>
  651. <ul class="navList">
  652. <li><a href="../../../../../index.html?org/apache/commons/io/input/NullReader.html" target="_top">Frames</a></li>
  653. <li><a href="NullReader.html" target="_top">No&nbsp;Frames</a></li>
  654. </ul>
  655. <ul class="navList" id="allclasses_navbar_bottom">
  656. <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  657. </ul>
  658. <div>
  659. <script type="text/javascript"><!--
  660. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  661. if(window==top) {
  662. allClassesLink.style.display = "block";
  663. }
  664. else {
  665. allClassesLink.style.display = "none";
  666. }
  667. //-->
  668. </script>
  669. </div>
  670. <div>
  671. <ul class="subNavList">
  672. <li>Summary:&nbsp;</li>
  673. <li>Nested&nbsp;|&nbsp;</li>
  674. <li><a href="#fields.inherited.from.class.java.io.Reader">Field</a>&nbsp;|&nbsp;</li>
  675. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  676. <li><a href="#method.summary">Method</a></li>
  677. </ul>
  678. <ul class="subNavList">
  679. <li>Detail:&nbsp;</li>
  680. <li>Field&nbsp;|&nbsp;</li>
  681. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  682. <li><a href="#method.detail">Method</a></li>
  683. </ul>
  684. </div>
  685. <a name="skip.navbar.bottom">
  686. <!-- -->
  687. </a></div>
  688. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  689. <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>
  690. </body>
  691. </html>