src/java.desktop/share/classes/javax/imageio/stream/FileCacheImageInputStream.java
Print this page
@@ -85,11 +85,11 @@
*
* @exception IllegalArgumentException if <code>stream</code> is
* <code>null</code>.
* @exception IllegalArgumentException if <code>cacheDir</code> is
* non-<code>null</code> but is not a directory.
- * @exception IOException if a cache file cannot be created.
+ * @throws IOException if a cache file cannot be created.
*/
public FileCacheImageInputStream(InputStream stream, File cacheDir)
throws IOException {
if (stream == null) {
throw new IllegalArgumentException("stream == null!");
@@ -120,10 +120,13 @@
/**
* Ensures that at least <code>pos</code> bytes are cached,
* or the end of the source is reached. The return value
* is equal to the smaller of <code>pos</code> and the
* length of the source file.
+ *
+ * @throws IOException if an I/O error occurs while reading from the
+ * source file
*/
private long readUntil(long pos) throws IOException {
// We've already got enough data cached
if (pos < length) {
return pos;
@@ -242,11 +245,11 @@
/**
* Closes this <code>FileCacheImageInputStream</code>, closing
* and removing the cache file. The source <code>InputStream</code>
* is not closed.
*
- * @exception IOException if an error occurs.
+ * @throws IOException if an error occurs.
*/
public void close() throws IOException {
super.close();
disposerRecord.dispose(); // this will close/delete the cache file
stream = null;