Advertisement
Guest User

jdk1.7.0_45 search in sublime text for EOFException

a guest
Jan 30th, 2014
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.95 KB | None | 0 0
  1. Searching 7454 files for "EOFException"
  2.  
  3. C:\Documents and Settings\Me\My Documents\java source code\com\sun\corba\se\impl\io\IIOPInputStream.java:
  4. 43 import java.io.WriteAbortedException;
  5. 44 import java.io.Externalizable;
  6. 45: import java.io.EOFException;
  7. 46 import java.lang.reflect.*;
  8. 47 import java.util.Vector;
  9. ..
  10. 932 // of the class attempts to read more data than is present in the
  11. 933 // optional part of the stream for this class, the stream will
  12. 934: // return -1 for bytewise reads, throw an EOFException for
  13. 935 // primitive data reads, or throw an OptionalDataException
  14. 936 // with the eof field set to true for object reads."
  15. ...
  16. 941
  17. 942 if (!objectRead)
  18. 943: result = new EOFException("No more optional data");
  19. 944 else
  20. 945 result = createOptionalDataException();
  21.  
  22. C:\Documents and Settings\Me\My Documents\java source code\com\sun\imageio\plugins\gif\GIFImageReader.java:
  23. 33 import java.io.BufferedInputStream;
  24. 34 import java.io.DataInputStream;
  25. 35: import java.io.EOFException;
  26. 36 import java.io.InputStream;
  27. 37 import java.io.IOException;
  28. ..
  29. 561 }
  30. 562 }
  31. 563: } catch (EOFException e) {
  32. 564 return false;
  33. 565 } catch (IOException e) {
  34.  
  35. C:\Documents and Settings\Me\My Documents\java source code\com\sun\imageio\plugins\png\PNGImageReader.java:
  36. 38 import java.io.ByteArrayInputStream;
  37. 39 import java.io.DataInputStream;
  38. 40: import java.io.EOFException;
  39. 41 import java.io.InputStream;
  40. 42 import java.io.IOException;
  41. ..
  42. 214 int count = 0;
  43. 215 while ((maxLen > count++) && ((b = stream.read()) != 0)) {
  44. 216: if (b == -1) throw new EOFException();
  45. 217 baos.write(b);
  46. 218 }
  47.  
  48. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\XML11EntityScanner.java:
  49. 103 *
  50. 104 * @throws IOException Thrown if i/o error occurs.
  51. 105: * @throws EOFException Thrown on end of file.
  52. 106 */
  53. 107 public int peekChar() throws IOException {
  54. ...
  55. 131 *
  56. 132 * @throws IOException Thrown if i/o error occurs.
  57. 133: * @throws EOFException Thrown on end of file.
  58. 134 */
  59. 135 public int scanChar() throws IOException {
  60. ...
  61. 176 *
  62. 177 * @throws IOException Thrown if i/o error occurs.
  63. 178: * @throws EOFException Thrown on end of file.
  64. 179 *
  65. 180 * @see com.sun.org.apache.xerces.internal.util.SymbolTable
  66. ...
  67. 286 *
  68. 287 * @throws IOException Thrown if i/o error occurs.
  69. 288: * @throws EOFException Thrown on end of file.
  70. 289 *
  71. 290 * @see com.sun.org.apache.xerces.internal.util.SymbolTable
  72. ...
  73. 440 *
  74. 441 * @throws IOException Thrown if i/o error occurs.
  75. 442: * @throws EOFException Thrown on end of file.
  76. 443 *
  77. 444 * @see com.sun.org.apache.xerces.internal.util.SymbolTable
  78. ...
  79. 601 *
  80. 602 * @throws IOException Thrown if i/o error occurs.
  81. 603: * @throws EOFException Thrown on end of file.
  82. 604 *
  83. 605 * @see com.sun.org.apache.xerces.internal.util.SymbolTable
  84. ...
  85. 815 *
  86. 816 * @throws IOException Thrown if i/o error occurs.
  87. 817: * @throws EOFException Thrown on end of file.
  88. 818 */
  89. 819 public int scanContent(XMLString content) throws IOException {
  90. ...
  91. 956 *
  92. 957 * @throws IOException Thrown if i/o error occurs.
  93. 958: * @throws EOFException Thrown on end of file.
  94. 959 */
  95. 960 public int scanLiteral(int quote, XMLString content)
  96. ...
  97. 1102 *
  98. 1103 * @throws IOException Thrown if i/o error occurs.
  99. 1104: * @throws EOFException Thrown on end of file.
  100. 1105 */
  101. 1106 public boolean scanData(String delimiter, XMLStringBuffer buffer)
  102. ....
  103. 1304 *
  104. 1305 * @throws IOException Thrown if i/o error occurs.
  105. 1306: * @throws EOFException Thrown on end of file.
  106. 1307 */
  107. 1308 public boolean skipChar(int c) throws IOException {
  108. ....
  109. 1361 *
  110. 1362 * @throws IOException Thrown if i/o error occurs.
  111. 1363: * @throws EOFException Thrown on end of file.
  112. 1364 *
  113. 1365 * @see com.sun.org.apache.xerces.internal.util.XMLChar#isSpace
  114. ....
  115. 1491 *
  116. 1492 * @throws IOException Thrown if i/o error occurs.
  117. 1493: * @throws EOFException Thrown on end of file.
  118. 1494 */
  119. 1495 public boolean skipString(String s) throws IOException {
  120.  
  121. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\XMLDocumentFragmentScannerImpl.java:
  122. 27 import com.sun.xml.internal.stream.dtd.DTDGrammarUtil;
  123. 28
  124. 29: import java.io.EOFException;
  125. 30 import java.io.IOException;
  126. 31 import javax.xml.stream.XMLInputFactory;
  127. ..
  128. 3149 }
  129. 3150 // premature end of file
  130. 3151: catch (EOFException e) {
  131. 3152 endOfFileHook(e);
  132. 3153 return -1;
  133. ....
  134. 3245 * is always premature.
  135. 3246 */
  136. 3247: protected void endOfFileHook(EOFException e)
  137. 3248 throws IOException, XNIException {
  138. 3249
  139.  
  140. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\XMLDocumentScannerImpl.java:
  141. 41 import com.sun.xml.internal.stream.StaxXMLInputSource;
  142. 42 import com.sun.xml.internal.stream.dtd.DTDGrammarUtil;
  143. 43: import java.io.EOFException;
  144. 44 import java.io.IOException;
  145. 45 import javax.xml.stream.XMLInputFactory;
  146. ..
  147. 573 } else{
  148. 574 //else we have reached the end of document prematurely
  149. 575: //so throw EOFException.
  150. 576: throw new java.io.EOFException();
  151. 577 }
  152. 578
  153. ...
  154. 792
  155. 793 // premature end of file
  156. 794: catch (EOFException e) {
  157. 795 reportFatalError("PrematureEOF", null);
  158. 796 return -1;
  159. ...
  160. 1016 }
  161. 1017 // premature end of file
  162. 1018: catch (EOFException e) {
  163. 1019 reportFatalError("PrematureEOF", null);
  164. 1020 //xxx what should be returned here.... ???
  165. ....
  166. 1193
  167. 1194 // premature end of file
  168. 1195: catch (EOFException e) {
  169. 1196 e.printStackTrace();
  170. 1197 reportFatalError("PrematureEOF", null);
  171. ....
  172. 1304 * is always premature.
  173. 1305 */
  174. 1306: protected void endOfFileHook(EOFException e)
  175. 1307 throws IOException, XNIException {
  176. 1308
  177. ....
  178. 1456 }//switch
  179. 1457
  180. 1458: } catch (EOFException e) {
  181. 1459 // NOTE: This is the only place we're allowed to reach
  182. 1460 // the real end of the document stream. Unless the
  183. ....
  184. 1465 //throw e;
  185. 1466 }
  186. 1467: //System.out.println("EOFException thrown") ;
  187. 1468 setScannerState(SCANNER_STATE_TERMINATED);
  188. 1469 }
  189.  
  190. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\XMLDTDScannerImpl.java:
  191. 21 package com.sun.org.apache.xerces.internal.impl;
  192. 22 import com.sun.xml.internal.stream.dtd.nonvalidating.DTDGrammar;
  193. 23: import java.io.EOFException;
  194. 24 import java.io.IOException;
  195. 25
  196. ..
  197. 639 if (augs != null && Boolean.TRUE.equals(augs.getItem(Constants.LAST_ENTITY))
  198. 640 && ( fMarkUpDepth != 0 || fExtEntityDepth !=0 || fIncludeSectDepth != 0)){
  199. 641: throw new EOFException();
  200. 642 }
  201. 643
  202.  
  203. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\XMLEntityManager.java:
  204. 1400
  205. 1401 if(fCurrentEntity == null & !documentEntity){
  206. 1402: throw new EOFException() ;
  207. 1403 }
  208. 1404
  209.  
  210. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\XMLEntityScanner.java:
  211. 21 package com.sun.org.apache.xerces.internal.impl;
  212. 22
  213. 23: import java.io.EOFException;
  214. 24 import java.io.IOException;
  215. 25 import java.util.Locale;
  216. ..
  217. 84 * To signal the end of the document entity, this exception will be thrown.
  218. 85 */
  219. 86: private static final EOFException END_OF_DOCUMENT_ENTITY = new EOFException() {
  220. 87 private static final long serialVersionUID = 980337771224675268L;
  221. 88 public Throwable fillInStackTrace() {
  222. ..
  223. 483 *
  224. 484 * @throws IOException Thrown if i/o error occurs.
  225. 485: * @throws EOFException Thrown on end of file.
  226. 486 */
  227. 487 public int peekChar() throws IOException {
  228. ...
  229. 525 *
  230. 526 * @throws IOException Thrown if i/o error occurs.
  231. 527: * @throws EOFException Thrown on end of file.
  232. 528 */
  233. 529 public int scanChar() throws IOException {
  234. ...
  235. 580 *
  236. 581 * @throws IOException Thrown if i/o error occurs.
  237. 582: * @throws EOFException Thrown on end of file.
  238. 583 *
  239. 584 * @see com.sun.org.apache.xerces.internal.util.SymbolTable
  240. ...
  241. 659 *
  242. 660 * @throws IOException Thrown if i/o error occurs.
  243. 661: * @throws EOFException Thrown on end of file.
  244. 662 *
  245. 663 * @see com.sun.org.apache.xerces.internal.util.SymbolTable
  246. ...
  247. 762 *
  248. 763 * @throws IOException Thrown if i/o error occurs.
  249. 764: * @throws EOFException Thrown on end of file.
  250. 765 *
  251. 766 * @see com.sun.org.apache.xerces.internal.util.SymbolTable
  252. ...
  253. 908 *
  254. 909 * @throws IOException Thrown if i/o error occurs.
  255. 910: * @throws EOFException Thrown on end of file.
  256. 911 */
  257. 912 public int scanContent(XMLString content) throws IOException {
  258. ...
  259. 1060 *
  260. 1061 * @throws IOException Thrown if i/o error occurs.
  261. 1062: * @throws EOFException Thrown on end of file.
  262. 1063 */
  263. 1064 public int scanLiteral(int quote, XMLString content)
  264. ....
  265. 1232 *
  266. 1233 * @throws IOException Thrown if i/o error occurs.
  267. 1234: * @throws EOFException Thrown on end of file.
  268. 1235 */
  269. 1236 public boolean scanData(String delimiter, XMLStringBuffer buffer)
  270. ....
  271. 1412 *
  272. 1413 * @throws IOException Thrown if i/o error occurs.
  273. 1414: * @throws EOFException Thrown on end of file.
  274. 1415 */
  275. 1416 public boolean skipChar(int c) throws IOException {
  276. ....
  277. 1486 *
  278. 1487 * @throws IOException Thrown if i/o error occurs.
  279. 1488: * @throws EOFException Thrown on end of file.
  280. 1489 *
  281. 1490 * @see com.sun.org.apache.xerces.internal.util.XMLChar#isSpace
  282. ....
  283. 1658 *
  284. 1659 * @throws IOException Thrown if i/o error occurs.
  285. 1660: * @throws EOFException Thrown on end of file.
  286. 1661 */
  287. 1662 public boolean skipString(String s) throws IOException {
  288. ....
  289. 2096 *
  290. 2097 * @throws IOException Thrown if i/o error occurs.
  291. 2098: * @throws EOFException Thrown on end of file.
  292. 2099 *
  293. 2100 * @see com.sun.org.apache.xerces.internal.util.XMLChar#isSpace
  294.  
  295. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\XMLVersionDetector.java:
  296. 62 package com.sun.org.apache.xerces.internal.impl;
  297. 63
  298. 64: import java.io.EOFException;
  299. 65 import java.io.IOException;
  300. 66
  301. ..
  302. 232 // premature end of file
  303. 233 }
  304. 234: catch (EOFException e) {
  305. 235 fErrorReporter.reportError(
  306. 236 XMLMessageFormatter.XML_DOMAIN,
  307.  
  308. C:\Documents and Settings\Me\My Documents\java source code\com\sun\org\apache\xerces\internal\impl\dtd\XMLDTDLoader.java:
  309. 62 package com.sun.org.apache.xerces.internal.impl.dtd;
  310. 63
  311. 64: import java.io.EOFException;
  312. 65 import java.io.IOException;
  313. 66 import java.io.StringReader;
  314. ..
  315. 483 fDTDScanner.setInputSource(source);
  316. 484 fDTDScanner.scanDTDExternalSubset(true);
  317. 485: } catch (EOFException e) {
  318. 486 // expected behaviour...
  319. 487 }
  320. ...
  321. 530 }
  322. 531 }
  323. 532: catch (EOFException e) {
  324. 533 // expected behaviour...
  325. 534 }
  326.  
  327. C:\Documents and Settings\Me\My Documents\java source code\java\io\DataInput.java:
  328. 40 * routines in this interface that if end of
  329. 41 * file is reached before the desired number
  330. 42: * of bytes has been read, an <code>EOFException</code>
  331. 43 * (which is a kind of <code>IOException</code>)
  332. 44 * is thrown. If any byte cannot be read for
  333. 45 * any reason other than end of file, an <code>IOException</code>
  334. 46: * other than <code>EOFException</code> is
  335. 47 * thrown. In particular, an <code>IOException</code>
  336. 48 * may be thrown if the input stream has been
  337. ..
  338. 208 *
  339. 209 * <li>End of
  340. 210: * file is detected, in which case an <code>EOFException</code>
  341. 211 * is thrown.
  342. 212 *
  343. 213 * <li>An I/O error occurs, in
  344. 214 * which case an <code>IOException</code> other
  345. 215: * than <code>EOFException</code> is thrown.
  346. 216 * </ul>
  347. 217 * <p>
  348. ...
  349. 229 *
  350. 230 * @param b the buffer into which the data is read.
  351. 231: * @exception EOFException if this stream reaches the end before reading
  352. 232 * all the bytes.
  353. 233 * @exception IOException if an I/O error occurs.
  354. ...
  355. 250 *
  356. 251 * <li>End of file
  357. 252: * is detected, in which case an <code>EOFException</code>
  358. 253 * is thrown.
  359. 254 *
  360. 255 * <li>An I/O error occurs, in
  361. 256 * which case an <code>IOException</code> other
  362. 257: * than <code>EOFException</code> is thrown.
  363. 258 * </ul>
  364. 259 * <p>
  365. ...
  366. 275 * @param off an int specifying the offset into the data.
  367. 276 * @param len an int specifying the number of bytes to read.
  368. 277: * @exception EOFException if this stream reaches the end before reading
  369. 278 * all the bytes.
  370. 279 * @exception IOException if an I/O error occurs.
  371. ...
  372. 294 * have been skipped is
  373. 295 * only one possibility.
  374. 296: * This method never throws an <code>EOFException</code>.
  375. 297 * The actual
  376. 298 * number of bytes skipped is returned.
  377. ...
  378. 313 *
  379. 314 * @return the <code>boolean</code> value read.
  380. 315: * @exception EOFException if this stream reaches the end before reading
  381. 316 * all the bytes.
  382. 317 * @exception IOException if an I/O error occurs.
  383. ...
  384. 329 *
  385. 330 * @return the 8-bit value read.
  386. 331: * @exception EOFException if this stream reaches the end before reading
  387. 332 * all the bytes.
  388. 333 * @exception IOException if an I/O error occurs.
  389. ...
  390. 349 *
  391. 350 * @return the unsigned 8-bit value read.
  392. 351: * @exception EOFException if this stream reaches the end before reading
  393. 352 * all the bytes.
  394. 353 * @exception IOException if an I/O error occurs.
  395. ...
  396. 370 *
  397. 371 * @return the 16-bit value read.
  398. 372: * @exception EOFException if this stream reaches the end before reading
  399. 373 * all the bytes.
  400. 374 * @exception IOException if an I/O error occurs.
  401. ...
  402. 393 *
  403. 394 * @return the unsigned 16-bit value read.
  404. 395: * @exception EOFException if this stream reaches the end before reading
  405. 396 * all the bytes.
  406. 397 * @exception IOException if an I/O error occurs.
  407. ...
  408. 413 *
  409. 414 * @return the <code>char</code> value read.
  410. 415: * @exception EOFException if this stream reaches the end before reading
  411. 416 * all the bytes.
  412. 417 * @exception IOException if an I/O error occurs.
  413. ...
  414. 433 *
  415. 434 * @return the <code>int</code> value read.
  416. 435: * @exception EOFException if this stream reaches the end before reading
  417. 436 * all the bytes.
  418. 437 * @exception IOException if an I/O error occurs.
  419. ...
  420. 460 *
  421. 461 * @return the <code>long</code> value read.
  422. 462: * @exception EOFException if this stream reaches the end before reading
  423. 463 * all the bytes.
  424. 464 * @exception IOException if an I/O error occurs.
  425. ...
  426. 480 *
  427. 481 * @return the <code>float</code> value read.
  428. 482: * @exception EOFException if this stream reaches the end before reading
  429. 483 * all the bytes.
  430. 484 * @exception IOException if an I/O error occurs.
  431. ...
  432. 500 *
  433. 501 * @return the <code>double</code> value read.
  434. 502: * @exception EOFException if this stream reaches the end before reading
  435. 503 * all the bytes.
  436. 504 * @exception IOException if an I/O error occurs.
  437. ...
  438. 612 * If end of file is encountered
  439. 613 * at any time during this entire process,
  440. 614: * then an <code>EOFException</code> is thrown.
  441. 615 * <p>
  442. 616 * After every group has been converted to
  443. ...
  444. 626 * for reading by this method.
  445. 627 * @return a Unicode string.
  446. 628: * @exception EOFException if this stream reaches the end
  447. 629 * before reading all the bytes.
  448. 630 * @exception IOException if an I/O error occurs.
  449.  
  450. C:\Documents and Settings\Me\My Documents\java source code\java\io\DataInputStream.java:
  451. 159 *
  452. 160 * @param b the buffer into which the data is read.
  453. 161: * @exception EOFException if this input stream reaches the end before
  454. 162 * reading all the bytes.
  455. 163 * @exception IOException the stream has been closed and the contained
  456. ...
  457. 181 * @param off the start offset of the data.
  458. 182 * @param len the number of bytes to read.
  459. 183: * @exception EOFException if this input stream reaches the end before
  460. 184 * reading all the bytes.
  461. 185 * @exception IOException the stream has been closed and the contained
  462. ...
  463. 195 int count = in.read(b, off + n, len - n);
  464. 196 if (count < 0)
  465. 197: throw new EOFException();
  466. 198 n += count;
  467. 199 }
  468. ...
  469. 233 *
  470. 234 * @return the <code>boolean</code> value read.
  471. 235: * @exception EOFException if this input stream has reached the end.
  472. 236 * @exception IOException the stream has been closed and the contained
  473. 237 * input stream does not support reading after close, or
  474. ...
  475. 242 int ch = in.read();
  476. 243 if (ch < 0)
  477. 244: throw new EOFException();
  478. 245 return (ch != 0);
  479. 246 }
  480. ...
  481. 256 * @return the next byte of this input stream as a signed 8-bit
  482. 257 * <code>byte</code>.
  483. 258: * @exception EOFException if this input stream has reached the end.
  484. 259 * @exception IOException the stream has been closed and the contained
  485. 260 * input stream does not support reading after close, or
  486. ...
  487. 265 int ch = in.read();
  488. 266 if (ch < 0)
  489. 267: throw new EOFException();
  490. 268 return (byte)(ch);
  491. 269 }
  492. ...
  493. 279 * @return the next byte of this input stream, interpreted as an
  494. 280 * unsigned 8-bit number.
  495. 281: * @exception EOFException if this input stream has reached the end.
  496. 282 * @exception IOException the stream has been closed and the contained
  497. 283 * input stream does not support reading after close, or
  498. ...
  499. 288 int ch = in.read();
  500. 289 if (ch < 0)
  501. 290: throw new EOFException();
  502. 291 return ch;
  503. 292 }
  504. ...
  505. 302 * @return the next two bytes of this input stream, interpreted as a
  506. 303 * signed 16-bit number.
  507. 304: * @exception EOFException if this input stream reaches the end before
  508. 305 * reading two bytes.
  509. 306 * @exception IOException the stream has been closed and the contained
  510. ...
  511. 313 int ch2 = in.read();
  512. 314 if ((ch1 | ch2) < 0)
  513. 315: throw new EOFException();
  514. 316 return (short)((ch1 << 8) + (ch2 << 0));
  515. 317 }
  516. ...
  517. 327 * @return the next two bytes of this input stream, interpreted as an
  518. 328 * unsigned 16-bit integer.
  519. 329: * @exception EOFException if this input stream reaches the end before
  520. 330 * reading two bytes.
  521. 331 * @exception IOException the stream has been closed and the contained
  522. ...
  523. 338 int ch2 = in.read();
  524. 339 if ((ch1 | ch2) < 0)
  525. 340: throw new EOFException();
  526. 341 return (ch1 << 8) + (ch2 << 0);
  527. 342 }
  528. ...
  529. 352 * @return the next two bytes of this input stream, interpreted as a
  530. 353 * <code>char</code>.
  531. 354: * @exception EOFException if this input stream reaches the end before
  532. 355 * reading two bytes.
  533. 356 * @exception IOException the stream has been closed and the contained
  534. ...
  535. 363 int ch2 = in.read();
  536. 364 if ((ch1 | ch2) < 0)
  537. 365: throw new EOFException();
  538. 366 return (char)((ch1 << 8) + (ch2 << 0));
  539. 367 }
  540. ...
  541. 377 * @return the next four bytes of this input stream, interpreted as an
  542. 378 * <code>int</code>.
  543. 379: * @exception EOFException if this input stream reaches the end before
  544. 380 * reading four bytes.
  545. 381 * @exception IOException the stream has been closed and the contained
  546. ...
  547. 390 int ch4 = in.read();
  548. 391 if ((ch1 | ch2 | ch3 | ch4) < 0)
  549. 392: throw new EOFException();
  550. 393 return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
  551. 394 }
  552. ...
  553. 406 * @return the next eight bytes of this input stream, interpreted as a
  554. 407 * <code>long</code>.
  555. 408: * @exception EOFException if this input stream reaches the end before
  556. 409 * reading eight bytes.
  557. 410 * @exception IOException the stream has been closed and the contained
  558. ...
  559. 435 * @return the next four bytes of this input stream, interpreted as a
  560. 436 * <code>float</code>.
  561. 437: * @exception EOFException if this input stream reaches the end before
  562. 438 * reading four bytes.
  563. 439 * @exception IOException the stream has been closed and the contained
  564. ...
  565. 457 * @return the next eight bytes of this input stream, interpreted as a
  566. 458 * <code>double</code>.
  567. 459: * @exception EOFException if this input stream reaches the end before
  568. 460 * reading eight bytes.
  569. 461 * @exception IOException the stream has been closed and the contained
  570. ...
  571. 552 *
  572. 553 * @return a Unicode string.
  573. 554: * @exception EOFException if this input stream reaches the end before
  574. 555 * reading all the bytes.
  575. 556 * @exception IOException the stream has been closed and the contained
  576. ...
  577. 577 * @param in a data input stream.
  578. 578 * @return a Unicode string.
  579. 579: * @exception EOFException if the input stream reaches the end
  580. 580 * before all the bytes.
  581. 581 * @exception IOException the stream has been closed and the contained
  582.  
  583. C:\Documents and Settings\Me\My Documents\java source code\java\io\EOFException.java:
  584. 41 */
  585. 42 public
  586. 43: class EOFException extends IOException {
  587. 44 private static final long serialVersionUID = 6433858223774886977L;
  588. 45
  589. 46 /**
  590. 47: * Constructs an <code>EOFException</code> with <code>null</code>
  591. 48 * as its error detail message.
  592. 49 */
  593. 50: public EOFException() {
  594. 51 super();
  595. 52 }
  596. 53
  597. 54 /**
  598. 55: * Constructs an <code>EOFException</code> with the specified detail
  599. 56 * message. The string <code>s</code> may later be retrieved by the
  600. 57 * <code>{@link java.lang.Throwable#getMessage}</code> method of class
  601. ..
  602. 60 * @param s the detail message.
  603. 61 */
  604. 62: public EOFException(String s) {
  605. 63 super(s);
  606. 64 }
  607.  
  608. C:\Documents and Settings\Me\My Documents\java source code\java\io\ObjectInputStream.java:
  609. 135 * end of data in the same way that they would indicate the end of the stream:
  610. 136 * bytewise reads will return -1 as the byte read or number of bytes read, and
  611. 137: * primitive reads will throw EOFExceptions. If there is no corresponding
  612. 138 * writeObject method, then the end of default serialized data marks the end of
  613. 139 * the allotted data.
  614. ...
  615. 143 * data written by the corresponding writeExternal method, object reads will
  616. 144 * throw OptionalDataExceptions with eof set to true, bytewise reads will
  617. 145: * return -1, and primitive reads will throw EOFExceptions. Note that this
  618. 146 * behavior does not hold for streams written with the old
  619. 147 * <code>ObjectStreamConstants.PROTOCOL_VERSION_1</code> protocol, in which the
  620. ...
  621. 899 *
  622. 900 * @return the boolean read.
  623. 901: * @throws EOFException If end of file is reached.
  624. 902 * @throws IOException If other I/O error has occurred.
  625. 903 */
  626. ...
  627. 910 *
  628. 911 * @return the 8 bit byte read.
  629. 912: * @throws EOFException If end of file is reached.
  630. 913 * @throws IOException If other I/O error has occurred.
  631. 914 */
  632. ...
  633. 921 *
  634. 922 * @return the 8 bit byte read.
  635. 923: * @throws EOFException If end of file is reached.
  636. 924 * @throws IOException If other I/O error has occurred.
  637. 925 */
  638. ...
  639. 932 *
  640. 933 * @return the 16 bit char read.
  641. 934: * @throws EOFException If end of file is reached.
  642. 935 * @throws IOException If other I/O error has occurred.
  643. 936 */
  644. ...
  645. 943 *
  646. 944 * @return the 16 bit short read.
  647. 945: * @throws EOFException If end of file is reached.
  648. 946 * @throws IOException If other I/O error has occurred.
  649. 947 */
  650. ...
  651. 954 *
  652. 955 * @return the 16 bit short read.
  653. 956: * @throws EOFException If end of file is reached.
  654. 957 * @throws IOException If other I/O error has occurred.
  655. 958 */
  656. ...
  657. 965 *
  658. 966 * @return the 32 bit integer read.
  659. 967: * @throws EOFException If end of file is reached.
  660. 968 * @throws IOException If other I/O error has occurred.
  661. 969 */
  662. ...
  663. 976 *
  664. 977 * @return the read 64 bit long.
  665. 978: * @throws EOFException If end of file is reached.
  666. 979 * @throws IOException If other I/O error has occurred.
  667. 980 */
  668. ...
  669. 987 *
  670. 988 * @return the 32 bit float read.
  671. 989: * @throws EOFException If end of file is reached.
  672. 990 * @throws IOException If other I/O error has occurred.
  673. 991 */
  674. ...
  675. 998 *
  676. 999 * @return the 64 bit double read.
  677. 1000: * @throws EOFException If end of file is reached.
  678. 1001 * @throws IOException If other I/O error has occurred.
  679. 1002 */
  680. ....
  681. 1009 *
  682. 1010 * @param buf the buffer into which the data is read
  683. 1011: * @throws EOFException If end of file is reached.
  684. 1012 * @throws IOException If other I/O error has occurred.
  685. 1013 */
  686. ....
  687. 1022 * @param off the start offset of the data
  688. 1023 * @param len the maximum number of bytes to read
  689. 1024: * @throws EOFException If end of file is reached.
  690. 1025 * @throws IOException If other I/O error has occurred.
  691. 1026 */
  692. ....
  693. 2323 int count = read(b, off + n, len - n);
  694. 2324 if (count < 0) {
  695. 2325: throw new EOFException();
  696. 2326 }
  697. 2327 n += count;
  698. ....
  699. 2513 }
  700. 2514 }
  701. 2515: } catch (EOFException ex) {
  702. 2516 throw new StreamCorruptedException(
  703. 2517 "unexpected EOF while reading block data header");
  704. ....
  705. 2590 /**
  706. 2591 * Peeks at (but does not consume) and returns the next byte value in
  707. 2592: * the stream, or throws EOFException if end of stream/block data has
  708. 2593 * been reached.
  709. 2594 */
  710. ....
  711. 2596 int val = peek();
  712. 2597 if (val < 0) {
  713. 2598: throw new EOFException();
  714. 2599 }
  715. 2600 return (byte) val;
  716. ....
  717. 2742 int n = read(b, off, len, copy);
  718. 2743 if (n < 0) {
  719. 2744: throw new EOFException();
  720. 2745 }
  721. 2746 off += n;
  722. ....
  723. 2756 int v = read();
  724. 2757 if (v < 0) {
  725. 2758: throw new EOFException();
  726. 2759 }
  727. 2760 return (v != 0);
  728. ....
  729. 2764 int v = read();
  730. 2765 if (v < 0) {
  731. 2766: throw new EOFException();
  732. 2767 }
  733. 2768 return (byte) v;
  734. ....
  735. 2772 int v = read();
  736. 2773 if (v < 0) {
  737. 2774: throw new EOFException();
  738. 2775 }
  739. 2776 return v;
  740.  
  741. C:\Documents and Settings\Me\My Documents\java source code\java\io\RandomAccessFile.java:
  742. 48 * It is generally true of all the reading routines in this class that
  743. 49 * if end-of-file is reached before the desired number of bytes has been
  744. 50: * read, an <code>EOFException</code> (which is a kind of
  745. 51 * <code>IOException</code>) is thrown. If any byte cannot be read for
  746. 52 * any reason other than end-of-file, an <code>IOException</code> other
  747. 53: * than <code>EOFException</code> is thrown. In particular, an
  748. 54 * <code>IOException</code> may be thrown if the stream has been closed.
  749. 55 *
  750. ..
  751. 417 *
  752. 418 * @param b the buffer into which the data is read.
  753. 419: * @exception EOFException if this file reaches the end before reading
  754. 420 * all the bytes.
  755. 421 * @exception IOException if an I/O error occurs.
  756. ...
  757. 435 * @param off the start offset of the data.
  758. 436 * @param len the number of bytes to read.
  759. 437: * @exception EOFException if this file reaches the end before reading
  760. 438 * all the bytes.
  761. 439 * @exception IOException if an I/O error occurs.
  762. ...
  763. 444 int count = this.read(b, off + n, len - n);
  764. 445 if (count < 0)
  765. 446: throw new EOFException();
  766. 447 n += count;
  767. 448 } while (n < len);
  768. ...
  769. 457 * This may result from any of a number of conditions; reaching end of
  770. 458 * file before <code>n</code> bytes have been skipped is only one
  771. 459: * possibility. This method never throws an <code>EOFException</code>.
  772. 460 * The actual number of bytes skipped is returned. If <code>n</code>
  773. 461 * is negative, no bytes are skipped.
  774. ...
  775. 660 *
  776. 661 * @return the <code>boolean</code> value read.
  777. 662: * @exception EOFException if this file has reached the end.
  778. 663 * @exception IOException if an I/O error occurs.
  779. 664 */
  780. ...
  781. 666 int ch = this.read();
  782. 667 if (ch < 0)
  783. 668: throw new EOFException();
  784. 669 return (ch != 0);
  785. 670 }
  786. ...
  787. 685 * @return the next byte of this file as a signed eight-bit
  788. 686 * <code>byte</code>.
  789. 687: * @exception EOFException if this file has reached the end.
  790. 688 * @exception IOException if an I/O error occurs.
  791. 689 */
  792. ...
  793. 691 int ch = this.read();
  794. 692 if (ch < 0)
  795. 693: throw new EOFException();
  796. 694 return (byte)(ch);
  797. 695 }
  798. ...
  799. 705 * @return the next byte of this file, interpreted as an unsigned
  800. 706 * eight-bit number.
  801. 707: * @exception EOFException if this file has reached the end.
  802. 708 * @exception IOException if an I/O error occurs.
  803. 709 */
  804. ...
  805. 711 int ch = this.read();
  806. 712 if (ch < 0)
  807. 713: throw new EOFException();
  808. 714 return ch;
  809. 715 }
  810. ...
  811. 731 * @return the next two bytes of this file, interpreted as a signed
  812. 732 * 16-bit number.
  813. 733: * @exception EOFException if this file reaches the end before reading
  814. 734 * two bytes.
  815. 735 * @exception IOException if an I/O error occurs.
  816. ...
  817. 739 int ch2 = this.read();
  818. 740 if ((ch1 | ch2) < 0)
  819. 741: throw new EOFException();
  820. 742 return (short)((ch1 << 8) + (ch2 << 0));
  821. 743 }
  822. ...
  823. 759 * @return the next two bytes of this file, interpreted as an unsigned
  824. 760 * 16-bit integer.
  825. 761: * @exception EOFException if this file reaches the end before reading
  826. 762 * two bytes.
  827. 763 * @exception IOException if an I/O error occurs.
  828. ...
  829. 767 int ch2 = this.read();
  830. 768 if ((ch1 | ch2) < 0)
  831. 769: throw new EOFException();
  832. 770 return (ch1 << 8) + (ch2 << 0);
  833. 771 }
  834. ...
  835. 787 * @return the next two bytes of this file, interpreted as a
  836. 788 * <code>char</code>.
  837. 789: * @exception EOFException if this file reaches the end before reading
  838. 790 * two bytes.
  839. 791 * @exception IOException if an I/O error occurs.
  840. ...
  841. 795 int ch2 = this.read();
  842. 796 if ((ch1 | ch2) < 0)
  843. 797: throw new EOFException();
  844. 798 return (char)((ch1 << 8) + (ch2 << 0));
  845. 799 }
  846. ...
  847. 815 * @return the next four bytes of this file, interpreted as an
  848. 816 * <code>int</code>.
  849. 817: * @exception EOFException if this file reaches the end before reading
  850. 818 * four bytes.
  851. 819 * @exception IOException if an I/O error occurs.
  852. ...
  853. 825 int ch4 = this.read();
  854. 826 if ((ch1 | ch2 | ch3 | ch4) < 0)
  855. 827: throw new EOFException();
  856. 828 return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
  857. 829 }
  858. ...
  859. 853 * @return the next eight bytes of this file, interpreted as a
  860. 854 * <code>long</code>.
  861. 855: * @exception EOFException if this file reaches the end before reading
  862. 856 * eight bytes.
  863. 857 * @exception IOException if an I/O error occurs.
  864. ...
  865. 874 * @return the next four bytes of this file, interpreted as a
  866. 875 * <code>float</code>.
  867. 876: * @exception EOFException if this file reaches the end before reading
  868. 877 * four bytes.
  869. 878 * @exception IOException if an I/O error occurs.
  870. ...
  871. 897 * @return the next eight bytes of this file, interpreted as a
  872. 898 * <code>double</code>.
  873. 899: * @exception EOFException if this file reaches the end before reading
  874. 900 * eight bytes.
  875. 901 * @exception IOException if an I/O error occurs.
  876. ...
  877. 979 *
  878. 980 * @return a Unicode string.
  879. 981: * @exception EOFException if this file reaches the end before
  880. 982 * reading all the bytes.
  881. 983 * @exception IOException if an I/O error occurs.
  882.  
  883. C:\Documents and Settings\Me\My Documents\java source code\java\security\DigestInputStream.java:
  884. 27
  885. 28 import java.io.IOException;
  886. 29: import java.io.EOFException;
  887. 30 import java.io.InputStream;
  888. 31 import java.io.FilterInputStream;
  889.  
  890. C:\Documents and Settings\Me\My Documents\java source code\java\security\DigestOutputStream.java:
  891. 27
  892. 28 import java.io.IOException;
  893. 29: import java.io.EOFException;
  894. 30 import java.io.OutputStream;
  895. 31 import java.io.FilterOutputStream;
  896.  
  897. C:\Documents and Settings\Me\My Documents\java source code\java\util\zip\GZIPInputStream.java:
  898. 30 import java.io.InputStream;
  899. 31 import java.io.IOException;
  900. 32: import java.io.EOFException;
  901. 33
  902. 34 /**
  903. ..
  904. 262 int b = in.read();
  905. 263 if (b == -1) {
  906. 264: throw new EOFException();
  907. 265 }
  908. 266 if (b < -1 || b > 255) {
  909. ...
  910. 282 int len = in.read(tmpbuf, 0, n < tmpbuf.length ? n : tmpbuf.length);
  911. 283 if (len == -1) {
  912. 284: throw new EOFException();
  913. 285 }
  914. 286 n -= len;
  915.  
  916. C:\Documents and Settings\Me\My Documents\java source code\java\util\zip\InflaterInputStream.java:
  917. 29 import java.io.InputStream;
  918. 30 import java.io.IOException;
  919. 31: import java.io.EOFException;
  920. 32
  921. 33 /**
  922. ..
  923. 238 len = in.read(buf, 0, buf.length);
  924. 239 if (len == -1) {
  925. 240: throw new EOFException("Unexpected end of ZLIB input stream");
  926. 241 }
  927. 242 inf.setInput(buf, 0, len);
  928.  
  929. C:\Documents and Settings\Me\My Documents\java source code\java\util\zip\ZipFile.java:
  930. 29 import java.io.InputStream;
  931. 30 import java.io.IOException;
  932. 31: import java.io.EOFException;
  933. 32 import java.io.File;
  934. 33 import java.nio.charset.Charset;
  935. ..
  936. 411 protected void fill() throws IOException {
  937. 412 if (eof) {
  938. 413: throw new EOFException("Unexpected end of ZLIB input stream");
  939. 414 }
  940. 415 len = in.read(buf, 0, buf.length);
  941.  
  942. C:\Documents and Settings\Me\My Documents\java source code\java\util\zip\ZipInputStream.java:
  943. 28 import java.io.InputStream;
  944. 29 import java.io.IOException;
  945. 30: import java.io.EOFException;
  946. 31 import java.io.PushbackInputStream;
  947. 32 import java.nio.charset.Charset;
  948. ..
  949. 276 try {
  950. 277 readFully(tmpbuf, 0, LOCHDR);
  951. 278: } catch (EOFException e) {
  952. 279 return null;
  953. 280 }
  954. ...
  955. 424 int n = in.read(b, off, len);
  956. 425 if (n == -1) {
  957. 426: throw new EOFException();
  958. 427 }
  959. 428 off += n;
  960.  
  961. C:\Documents and Settings\Me\My Documents\java source code\javax\imageio\stream\FileCacheImageOutputStream.java:
  962. 156 * Sets the current stream position and resets the bit offset to
  963. 157 * 0. It is legal to seek past the end of the file; an
  964. 158: * <code>EOFException</code> will be thrown only if a read is
  965. 159 * performed. The file length will not be increased until a write
  966. 160 * is performed.
  967.  
  968. C:\Documents and Settings\Me\My Documents\java source code\javax\imageio\stream\FileImageOutputStream.java:
  969. 138 * Sets the current stream position and resets the bit offset to
  970. 139 * 0. It is legal to seeking past the end of the file; an
  971. 140: * <code>EOFException</code> will be thrown only if a read is
  972. 141 * performed. The file length will not be increased until a write
  973. 142 * is performed.
  974.  
  975. C:\Documents and Settings\Me\My Documents\java source code\javax\imageio\stream\ImageInputStream.java:
  976. 184 * @return a boolean value from the stream.
  977. 185 *
  978. 186: * @exception EOFException if the end of the stream is reached.
  979. 187 * @exception IOException if an I/O error occurs.
  980. 188 */
  981. ...
  982. 202 * @return a signed byte value from the stream.
  983. 203 *
  984. 204: * @exception EOFException if the end of the stream is reached.
  985. 205 * @exception IOException if an I/O error occurs.
  986. 206 */
  987. ...
  988. 226 * @return an unsigned byte value from the stream.
  989. 227 *
  990. 228: * @exception EOFException if the end of the stream is reached.
  991. 229 * @exception IOException if an I/O error occurs.
  992. 230 */
  993. ...
  994. 241 * @return a signed short value from the stream.
  995. 242 *
  996. 243: * @exception EOFException if the stream reaches the end before
  997. 244 * reading all the bytes.
  998. 245 * @exception IOException if an I/O error occurs.
  999. ...
  1000. 262 * @return an unsigned short value from the stream, as an int.
  1001. 263 *
  1002. 264: * @exception EOFException if the stream reaches the end before
  1003. 265 * reading all the bytes.
  1004. 266 * @exception IOException if an I/O error occurs.
  1005. ...
  1006. 279 * @return an unsigned char value from the stream.
  1007. 280 *
  1008. 281: * @exception EOFException if the stream reaches the end before
  1009. 282 * reading all the bytes.
  1010. 283 * @exception IOException if an I/O error occurs.
  1011. ...
  1012. 297 * @return a signed int value from the stream.
  1013. 298 *
  1014. 299: * @exception EOFException if the stream reaches the end before
  1015. 300 * reading all the bytes.
  1016. 301 * @exception IOException if an I/O error occurs.
  1017. ...
  1018. 317 * @return an unsigned int value from the stream, as a long.
  1019. 318 *
  1020. 319: * @exception EOFException if the stream reaches the end before
  1021. 320 * reading all the bytes.
  1022. 321 * @exception IOException if an I/O error occurs.
  1023. ...
  1024. 335 * @return a signed long value from the stream.
  1025. 336 *
  1026. 337: * @exception EOFException if the stream reaches the end before
  1027. 338 * reading all the bytes.
  1028. 339 * @exception IOException if an I/O error occurs.
  1029. ...
  1030. 353 * @return a float value from the stream.
  1031. 354 *
  1032. 355: * @exception EOFException if the stream reaches the end before
  1033. 356 * reading all the bytes.
  1034. 357 * @exception IOException if an I/O error occurs.
  1035. ...
  1036. 371 * @return a double value from the stream.
  1037. 372 *
  1038. 373: * @exception EOFException if the stream reaches the end before
  1039. 374 * reading all the bytes.
  1040. 375 * @exception IOException if an I/O error occurs.
  1041. ...
  1042. 470 *
  1043. 471 * <p> If end of file is encountered at any time during this
  1044. 472: * entire process, then an <code>EOFException</code> is thrown.
  1045. 473 *
  1046. 474 * <p> After every group has been converted to a character by this
  1047. ...
  1048. 489 * @return a String read from the stream.
  1049. 490 *
  1050. 491: * @exception EOFException if this stream reaches the end
  1051. 492 * before reading all the bytes.
  1052. 493 * @exception UTFDataFormatException if the bytes do not represent a
  1053. ...
  1054. 500 * Reads <code>len</code> bytes from the stream, and stores them
  1055. 501 * into <code>b</code> starting at index <code>off</code>.
  1056. 502: * If the end of the stream is reached, an <code>EOFException</code>
  1057. 503 * will be thrown.
  1058. 504 *
  1059. ...
  1060. 515 * @exception NullPointerException if <code>b</code> is
  1061. 516 * <code>null</code>.
  1062. 517: * @exception EOFException if the stream reaches the end before
  1063. 518 * reading all the bytes.
  1064. 519 * @exception IOException if an I/O error occurs.
  1065. ...
  1066. 524 * Reads <code>b.length</code> bytes from the stream, and stores them
  1067. 525 * into <code>b</code> starting at index <code>0</code>.
  1068. 526: * If the end of the stream is reached, an <code>EOFException</code>
  1069. 527 * will be thrown.
  1070. 528 *
  1071. ...
  1072. 534 * @exception NullPointerException if <code>b</code> is
  1073. 535 * <code>null</code>.
  1074. 536: * @exception EOFException if the stream reaches the end before
  1075. 537 * reading all the bytes.
  1076. 538 * @exception IOException if an I/O error occurs.
  1077. ...
  1078. 545 * stores them into <code>s</code> starting at index
  1079. 546 * <code>off</code>. If the end of the stream is reached, an
  1080. 547: * <code>EOFException</code> will be thrown.
  1081. 548 *
  1082. 549 * <p> The bit offset within the stream is reset to zero before
  1083. ...
  1084. 559 * @exception NullPointerException if <code>s</code> is
  1085. 560 * <code>null</code>.
  1086. 561: * @exception EOFException if the stream reaches the end before
  1087. 562 * reading all the bytes.
  1088. 563 * @exception IOException if an I/O error occurs.
  1089. ...
  1090. 570 * stores them into <code>c</code> starting at index
  1091. 571 * <code>off</code>. If the end of the stream is reached, an
  1092. 572: * <code>EOFException</code> will be thrown.
  1093. 573 *
  1094. 574 * <p> The bit offset within the stream is reset to zero before
  1095. ...
  1096. 584 * @exception NullPointerException if <code>c</code> is
  1097. 585 * <code>null</code>.
  1098. 586: * @exception EOFException if the stream reaches the end before
  1099. 587 * reading all the bytes.
  1100. 588 * @exception IOException if an I/O error occurs.
  1101. ...
  1102. 595 * stores them into <code>i</code> starting at index
  1103. 596 * <code>off</code>. If the end of the stream is reached, an
  1104. 597: * <code>EOFException</code> will be thrown.
  1105. 598 *
  1106. 599 * <p> The bit offset within the stream is reset to zero before
  1107. ...
  1108. 609 * @exception NullPointerException if <code>i</code> is
  1109. 610 * <code>null</code>.
  1110. 611: * @exception EOFException if the stream reaches the end before
  1111. 612 * reading all the bytes.
  1112. 613 * @exception IOException if an I/O error occurs.
  1113. ...
  1114. 620 * stores them into <code>l</code> starting at index
  1115. 621 * <code>off</code>. If the end of the stream is reached, an
  1116. 622: * <code>EOFException</code> will be thrown.
  1117. 623 *
  1118. 624 * <p> The bit offset within the stream is reset to zero before
  1119. ...
  1120. 634 * @exception NullPointerException if <code>l</code> is
  1121. 635 * <code>null</code>.
  1122. 636: * @exception EOFException if the stream reaches the end before
  1123. 637 * reading all the bytes.
  1124. 638 * @exception IOException if an I/O error occurs.
  1125. ...
  1126. 645 * and stores them into <code>f</code> starting at
  1127. 646 * index <code>off</code>. If the end of the stream is reached,
  1128. 647: * an <code>EOFException</code> will be thrown.
  1129. 648 *
  1130. 649 * <p> The bit offset within the stream is reset to zero before
  1131. ...
  1132. 659 * @exception NullPointerException if <code>f</code> is
  1133. 660 * <code>null</code>.
  1134. 661: * @exception EOFException if the stream reaches the end before
  1135. 662 * reading all the bytes.
  1136. 663 * @exception IOException if an I/O error occurs.
  1137. ...
  1138. 670 * and stores them into <code>d</code> starting at
  1139. 671 * index <code>off</code>. If the end of the stream is reached,
  1140. 672: * an <code>EOFException</code> will be thrown.
  1141. 673 *
  1142. 674 * <p> The bit offset within the stream is reset to zero before
  1143. ...
  1144. 684 * @exception NullPointerException if <code>d</code> is
  1145. 685 * <code>null</code>.
  1146. 686: * @exception EOFException if the stream reaches the end before
  1147. 687 * reading all the bytes.
  1148. 688 * @exception IOException if an I/O error occurs.
  1149. ...
  1150. 749 * or <code>1</code>.
  1151. 750 *
  1152. 751: * @exception EOFException if the stream reaches the end before
  1153. 752 * reading all the bits.
  1154. 753 * @exception IOException if an I/O error occurs.
  1155. ...
  1156. 783 *
  1157. 784 * <p> If the end of the stream is encountered before all the bits
  1158. 785: * have been read, an <code>EOFException</code> is thrown.
  1159. 786 *
  1160. 787 * @param numBits the number of bits to read, as an <code>int</code>
  1161. ...
  1162. 792 * @exception IllegalArgumentException if <code>numBits</code>
  1163. 793 * is not between 0 and 64, inclusive.
  1164. 794: * @exception EOFException if the stream reaches the end before
  1165. 795 * reading all the bits.
  1166. 796 * @exception IOException if an I/O error occurs.
  1167. ...
  1168. 851 *
  1169. 852 * <p> It is legal to seek past the end of the file; an
  1170. 853: * <code>EOFException</code> will be thrown only if a read is
  1171. 854 * performed.
  1172. 855 *
  1173.  
  1174. C:\Documents and Settings\Me\My Documents\java source code\javax\imageio\stream\ImageInputStreamImpl.java:
  1175. 27
  1176. 28 import java.io.DataInputStream;
  1177. 29: import java.io.EOFException;
  1178. 30 import java.io.IOException;
  1179. 31 import java.nio.ByteOrder;
  1180. ..
  1181. 204 int ch = this.read();
  1182. 205 if (ch < 0) {
  1183. 206: throw new EOFException();
  1184. 207 }
  1185. 208 return (ch != 0);
  1186. ...
  1187. 212 int ch = this.read();
  1188. 213 if (ch < 0) {
  1189. 214: throw new EOFException();
  1190. 215 }
  1191. 216 return (byte)ch;
  1192. ...
  1193. 220 int ch = this.read();
  1194. 221 if (ch < 0) {
  1195. 222: throw new EOFException();
  1196. 223 }
  1197. 224 return ch;
  1198. ...
  1199. 227 public short readShort() throws IOException {
  1200. 228 if (read(byteBuf, 0, 2) < 0) {
  1201. 229: throw new EOFException();
  1202. 230 }
  1203. 231
  1204. ...
  1205. 249 public int readInt() throws IOException {
  1206. 250 if (read(byteBuf, 0, 4) < 0) {
  1207. 251: throw new EOFException();
  1208. 252 }
  1209. 253
  1210. ...
  1211. 351 int nbytes = read(b, off, len);
  1212. 352 if (nbytes == -1) {
  1213. 353: throw new EOFException();
  1214. 354 }
  1215. 355 off += nbytes;
  1216. ...
  1217. 650 int val = read();
  1218. 651 if (val == -1) {
  1219. 652: throw new EOFException();
  1220. 653 }
  1221. 654
  1222. ...
  1223. 685 int val = read();
  1224. 686 if (val == -1) {
  1225. 687: throw new EOFException();
  1226. 688 }
  1227. 689
  1228.  
  1229. 204 matches across 26 files
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement