hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: [PATCH] FilePart class
Date Tue, 27 Jan 2004 13:42:31 GMT
Robert,

Could you live with something like that (see patch below)?

Oleg

PS: Two feature requests may be of interest to you. BTW, we happily accept contributions ;-)


http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14036
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20288


Index: FilePart.java
===================================================================
RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/multipart/FilePart.java,v
retrieving revision 1.14.2.1
diff -u -r1.14.2.1 FilePart.java
--- FilePart.java	10 Oct 2003 04:16:03 -0000	1.14.2.1
+++ FilePart.java	27 Jan 2004 13:34:20 -0000
@@ -264,6 +264,16 @@
         }
     }
 
+    /** 
+     * Returns the source of the file part.
+     *  
+     * @return The source.
+     */
+    protected PartSource getSource() {
+        LOG.trace("enter getSource()");
+        return this.source;
+    }
+
     /**
      * Return the length of the data.
      * @return The length.




-----Original Message-----
From: BLasch@flsg.follett.com [mailto:BLasch@flsg.follett.com]
Sent: Monday, January 26, 2004 23:53
To: commons-httpclient-dev@jakarta.apache.org
Subject: [PATCH] FilePart class






Hi All,

I'm currently working on a subclass of
org.apache.commons.httpclient.methods.multipart.FilePart that allows the
multipart post to be stopped prematurely.  It would be really nice to have
protected access on the member variable source in FilePart, so I only have
to override the sendData function as opposed to most of the class.  Any
chance of getting this changed?

--- FilePart.java.orig  Mon Jan 26 16:40:39 2004
+++ FilePart.java Mon Jan 26 16:41:38 2004
@@ -109,7 +109,7 @@
         EncodingUtil.getAsciiBytes(FILE_NAME);

     /** Source of the file part. */
-    private PartSource source;
+    protected PartSource source;

     /**
      * FilePart Constructor.


Thanks.
- Robert Lasch
Follett Library and School Group


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


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


Mime
View raw message