commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mart...@apache.org>
Subject Re: [FileUpload] Different FileItem implementation
Date Wed, 25 Dec 2002 04:05:43 GMT
Fixed. Sorry for the long delay.

--
Martin Cooper


On Thu, 28 Nov 2002, Susana Pereira wrote:

>
>
> >On Thu, 21 Nov 2002, Susana Pereira wrote:
>
> > > Hi, I'm using FileUpload project and i've found some difficulties with
> >FileItem implementation.
>
> >What kind of difficulties have you had? Could they be solved with a
> >generally useful change to the FileUpload component?
>
> I resolved that by extending DefaultFileItem and implementing all the
> methods that i need on my own object. I believe that this is not the best
> way of doing it, but that was the only way...
>
>
>
> >
> > > I would like to use my own implementation of FileItem processing a
> >different disk storage. But, in FileUpload you're using a Class Cast to
> >DefaultFileItem:
> > >     OutputStream os = ((DefaultFileItem) item).getOutputStream();.
> >
> >That's a bug. The intent was that you be able to specify your own
> >implementation. I will fix this.
>
> I'll be waiting...
> Thanks.
> Susana.
>
> >
> > >
> > > So I've tried to extend DefaultFileItem, but I cannot access class
> >private fields such as 'storeLocation' and/or 'byteStream'.
> > > My questions are: Do I have to extend DefaultFileItem? (what's the
> >interest
> > > of an Interface if I can't use a different implementation?)
> > > Why isn't getOutputStream() a FileItem method?
> >
> >Good question! I predict that will be the fix... ;-)
> >
> >--
> >Martin Cooper
> >
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> --
> To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-user-help@jakarta.apache.org>
>
>


Mime
View raw message