hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r232398 - in /jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io: ContentLengthOutputStream.java IdentityOutputStream.java
Date Fri, 12 Aug 2005 21:36:18 GMT
Author: olegk
Date: Fri Aug 12 14:36:14 2005
New Revision: 232398

URL: http://svn.apache.org/viewcvs?rev=232398&view=rev
Log:
#close() method now calls #flush() method of the underlying output stream

Modified:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/ContentLengthOutputStream.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/IdentityOutputStream.java

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/ContentLengthOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/ContentLengthOutputStream.java?rev=232398&r1=232397&r2=232398&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/ContentLengthOutputStream.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/ContentLengthOutputStream.java
Fri Aug 12 14:36:14 2005
@@ -87,7 +87,10 @@
      * @throws IOException If an I/O problem occurs.
      */
     public void close() throws IOException {
-        this.closed = true;
+    	if (!this.closed) {
+            this.closed = true;
+            this.wrappedStream.flush();
+    	}
     }
 
     public void flush() throws IOException {

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/IdentityOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/IdentityOutputStream.java?rev=232398&r1=232397&r2=232398&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/IdentityOutputStream.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/io/IdentityOutputStream.java
Fri Aug 12 14:36:14 2005
@@ -65,7 +65,10 @@
      * @throws IOException If an I/O problem occurs.
      */
     public void close() throws IOException {
-        this.closed = true;
+    	if (!this.closed) {
+            this.closed = true;
+            this.wrappedStream.flush();
+    	}
     }
 
     public void flush() throws IOException {



Mime
View raw message