cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [02/12] git commit: use block-write for bytes writing
Date Thu, 20 Mar 2014 20:46:55 GMT
use block-write for bytes writing

Conflicts:
	rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5c29f785
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5c29f785
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5c29f785

Branch: refs/heads/2.6.x-fixes
Commit: 5c29f78529307ad9d1c5b233a7a115009a90ba69
Parents: fa42dc1
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Thu Feb 27 21:46:52 2014 +0100
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 20 16:40:41 2014 -0400

----------------------------------------------------------------------
 .../apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5c29f785/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
index 5c20748..aa4d1b5 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
@@ -38,8 +38,17 @@ public class ServletOutputStreamFilter extends ServletOutputStream {
     
     @Override
     public void write(int b) throws IOException {
-        m.getExchange().put(AbstractHTTPDestination.RESPONSE_COMMITED, Boolean.TRUE);
+        setComittedStatus();
         os.write(b);
     }
 
+    @Override
+    public void write(byte[] b, int off, int len) throws IOException {
+        setComittedStatus();
+        os.write(b, off, len);
+    }
+
+    private void setComittedStatus() {
+        m.getExchange().put(AbstractHTTPDestination.RESPONSE_COMMITED, Boolean.TRUE);
+    }
 }


Mime
View raw message