cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject git commit: use block-write for bytes writing
Date Fri, 28 Feb 2014 11:36:38 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 337c6c696 -> e8f68b300


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/e8f68b30
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e8f68b30
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e8f68b30

Branch: refs/heads/2.7.x-fixes
Commit: e8f68b30051499b624eb9a89e234c5128af8cb9f
Parents: 337c6c6
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Thu Feb 27 21:46:52 2014 +0100
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Fri Feb 28 12:34:45 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/e8f68b30/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