diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:43 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:43 -0800 |
commit | f013e1afd1e68af5e3b868c26a653bbfb39538f8 (patch) | |
tree | 7ad6c8fd9c7b55f4b4017171dec1cb760bbd26bf /awt/javax/imageio/stream/FileCacheImageInputStream.java | |
parent | e70cfafe580c6f2994c4827cd8a534aabf3eb05c (diff) | |
download | frameworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.zip frameworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.tar.gz frameworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'awt/javax/imageio/stream/FileCacheImageInputStream.java')
-rw-r--r-- | awt/javax/imageio/stream/FileCacheImageInputStream.java | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/awt/javax/imageio/stream/FileCacheImageInputStream.java b/awt/javax/imageio/stream/FileCacheImageInputStream.java index 47bc189..710ac66 100644 --- a/awt/javax/imageio/stream/FileCacheImageInputStream.java +++ b/awt/javax/imageio/stream/FileCacheImageInputStream.java @@ -15,38 +15,43 @@ * limitations under the License. */ - package javax.imageio.stream; import java.io.*; /** - * The FileCacheImageInputStream class is an implementation of - * ImageInputStream which reads from its InputStream - * and uses a temporary file as a cache. + * The FileCacheImageInputStream class is an implementation of ImageInputStream + * which reads from its InputStream and uses a temporary file as a cache. + * + * @since Android 1.0 */ public class FileCacheImageInputStream extends ImageInputStreamImpl { - - /** The is. */ + + /** + * The is. + */ private InputStream is; - - /** The file. */ + + /** + * The file. + */ private File file; - - /** The raf. */ - private RandomAccessFile raf; + /** + * The raf. + */ + private RandomAccessFile raf; /** - * Instantiates a new FileCacheImageInputStream from - * the specified InputStream and using the specified - * File as its cache directory. - * - * @param stream the InputStream for reading. - * @param cacheDir the cache directory where the chache file - * will be created. + * Instantiates a new FileCacheImageInputStream from the specified + * InputStream and using the specified File as its cache directory. * - * @throws IOException Signals that an I/O exception has occurred. + * @param stream + * the InputStream for reading. + * @param cacheDir + * the cache directory where the cache file will be created. + * @throws IOException + * if an I/O exception has occurred. */ public FileCacheImageInputStream(InputStream stream, File cacheDir) throws IOException { if (stream == null) { @@ -55,7 +60,8 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl { is = stream; if (cacheDir == null || cacheDir.isDirectory()) { - file = File.createTempFile(FileCacheImageOutputStream.IIO_TEMP_FILE_PREFIX, null, cacheDir); + file = File.createTempFile(FileCacheImageOutputStream.IIO_TEMP_FILE_PREFIX, null, + cacheDir); file.deleteOnExit(); } else { throw new IllegalArgumentException("Not a directory!"); |