commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbe...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpConnection.java
Date Thu, 10 Apr 2003 23:36:36 GMT
mbecke      2003/04/10 16:36:36

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpConnection.java
  Log:
  Fix for HTTPS when using a pre-1.4 JRE.
  
  PR: 18738
  Reviewed by: Oleg Kalnichevski
  
  Revision  Changes    Path
  1.55      +35 -8     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
  
  Index: HttpConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- HttpConnection.java	9 Apr 2003 18:37:59 -0000	1.54
  +++ HttpConnection.java	10 Apr 2003 23:36:36 -0000	1.55
  @@ -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);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message