geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r736909 - /geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
Date Fri, 23 Jan 2009 04:30:17 GMT
Author: gawor
Date: Thu Jan 22 20:30:17 2009
New Revision: 736909

URL: http://svn.apache.org/viewvc?rev=736909&view=rev
Log:
Can't read anything in if input is not set

Modified:
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java?rev=736909&r1=736908&r2=736909&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/handlers/AbstractImageHandler.java
Thu Jan 22 20:30:17 2009
@@ -32,6 +32,7 @@
 import javax.imageio.ImageIO;
 import javax.imageio.ImageReader;
 import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
 
 /**
  * @version $Rev$ $Date$
@@ -57,6 +58,8 @@
             throw new UnsupportedDataTypeException("Unknown image type " + ds.getContentType());
         }
         ImageReader reader = (ImageReader) i.next();
+        ImageInputStream iis = ImageIO.createImageInputStream(ds.getInputStream());
+        reader.setInput(iis);
         return reader.read(0);
     }
 



Mime
View raw message