harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r986141 - /harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java
Date Mon, 16 Aug 2010 22:19:44 GMT
Author: hindessm
Date: Mon Aug 16 22:19:43 2010
New Revision: 986141

URL: http://svn.apache.org/viewvc?rev=986141&view=rev
Log:
Applying patch from "[#HARMONY-6609] use cache in createImageInputStream()
& createImageOutputStream".

Modified:
    harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java

Modified: harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java?rev=986141&r1=986140&r2=986141&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java
Mon Aug 16 22:19:43 2010
@@ -76,7 +76,9 @@ public final class ImageIO {
         while (it.hasNext()) {
             ImageInputStreamSpi spi = it.next();
             if (spi.getInputClass().isInstance(input)) {
-                return spi.createInputStreamInstance(input);
+                return getUseCache() ?
+                		spi.createInputStreamInstance(input, true, getCacheDirectory()) :
+                		spi.createInputStreamInstance(input);
             }
         }
         return null;
@@ -93,8 +95,9 @@ public final class ImageIO {
         while (it.hasNext()) {
             ImageOutputStreamSpi spi = it.next();
             if (spi.getOutputClass().isInstance(output)) {
-                // todo - use getUseCache and getCacheDir here
-                return spi.createOutputStreamInstance(output);
+            	return getUseCache() ?
+            			spi.createOutputStreamInstance(output, true, getCacheDirectory()) :
+            		    spi.createOutputStreamInstance(output);
             }
         }
         return null;



Mime
View raw message