Author: dkulp
Date: Mon Oct 8 10:14:21 2007
New Revision: 582892
URL: http://svn.apache.org/viewvc?rev=582892&view=rev
Log:
Merged revisions 578705 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r578705 | ningjiang | 2007-09-24 04:32:49 -0400 (Mon, 24 Sep 2007) | 1 line
CXF-1059 call the doClose method before the cached stream close, added a
postClose method for close the other stream. Thanks Ryan
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/WriteOnCloseOutputStream.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java?rev=582892&r1=582891&r2=582892&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
Mon Oct 8 10:14:21 2007
@@ -105,6 +105,13 @@
protected void doClose() throws IOException {
}
+
+ /**
+ * Perform any actions required after stream closure (close the other
related stream etc.)
+ */
+ protected void postClose() throws IOException {
+
+ }
public void close() throws IOException {
currentStream.flush();
@@ -114,9 +121,11 @@
}
}
+ doClose();
currentStream.close();
dispose();
- doClose();
+ postClose();
+
}
public boolean equals(Object obj) {
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java?rev=582892&r1=582891&r2=582892&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/CacheAndWriteOutputStream.java
Mon Oct 8 10:14:21 2007
@@ -37,12 +37,13 @@
flowThroughStream = stream;
}
- @Override
- protected void doClose() throws IOException {
+
+ protected void postClose() throws IOException {
flowThroughStream.flush();
flowThroughStream.close();
}
-
+
+
@Override
protected void onWrite() throws IOException {
// does nothing
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/WriteOnCloseOutputStream.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/WriteOnCloseOutputStream.java?rev=582892&r1=582891&r2=582892&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/WriteOnCloseOutputStream.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/io/WriteOnCloseOutputStream.java
Mon Oct 8 10:14:21 2007
@@ -36,10 +36,11 @@
flowThroughStream = stream;
}
- @Override
- protected void doClose() throws IOException {
+
+ protected void postClose() throws IOException {
resetOut(flowThroughStream, true);
flowThroughStream.flush();
flowThroughStream.close();
- }
+ }
+
}