cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r627569 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
Date Wed, 13 Feb 2008 19:24:30 GMT
Author: dkulp
Date: Wed Feb 13 11:24:25 2008
New Revision: 627569

URL: http://svn.apache.org/viewvc?rev=627569&view=rev
Log:
Merged revisions 627520 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r627520 | dkulp | 2008-02-13 11:52:29 -0500 (Wed, 13 Feb 2008) | 2 lines
  
  Make sure the ImageOutputStreams are properly flushed.
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java?rev=627569&r1=627568&r2=627569&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
Wed Feb 13 11:24:25 2008
@@ -38,6 +38,7 @@
 import javax.activation.URLDataSource;
 import javax.imageio.ImageIO;
 import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
 import javax.mail.util.ByteArrayDataSource;
 import javax.xml.bind.JAXBContext;
 import javax.xml.stream.XMLStreamException;
@@ -162,9 +163,12 @@
                     
                     try {
                         BufferedImage bimg = convertToBufferedImage((Image) o);
-                        writer.setOutput(ImageIO.createImageOutputStream(bos));
+                        ImageOutputStream out = ImageIO.createImageOutputStream(bos); 
+                        writer.setOutput(out);
                         writer.write(bimg);
                         writer.dispose();
+                        out.flush();
+                        out.close();
                         bos.close();
                     } catch (IOException e) {
                         throw new Fault(e);



Mime
View raw message