Index: java/org/apache/commons/httpclient/HttpConnection.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v retrieving revision 1.54 diff -u -r1.54 HttpConnection.java --- java/org/apache/commons/httpclient/HttpConnection.java 9 Apr 2003 18:37:59 -0000 1.54 +++ java/org/apache/commons/httpclient/HttpConnection.java 10 Apr 2003 03:18:07 -0000 @@ -1090,13 +1090,16 @@ * A wrapper for output streams that closes the connection and converts to recoverable * exceptions as appropriable when an IOException occurs. */ - private class WrappedOutputStream extends FilterOutputStream { + private class WrappedOutputStream extends OutputStream { + + /** the actual output stream */ + private OutputStream out; /** * @param out the output stream to wrap */ public WrappedOutputStream(OutputStream out) { - super(out); + this.out = out; } /** @@ -1119,7 +1122,7 @@ public void write(int b) throws IOException { try { - super.write(b); + out.write(b); } catch (IOException ioe) { throw handleException(ioe); } @@ -1127,7 +1130,31 @@ public void flush() throws IOException { try { - super.flush(); + out.flush(); + } catch (IOException ioe) { + throw handleException(ioe); + } + } + + public void close() throws IOException { + try { + out.close(); + } catch (IOException ioe) { + throw handleException(ioe); + } + } + + public void write(byte[] b, int off, int len) throws IOException { + try { + out.write(b, off, len); + } catch (IOException ioe) { + throw handleException(ioe); + } + } + + public void write(byte[] b) throws IOException { + try { + out.write(b); } catch (IOException ioe) { throw handleException(ioe); }