commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Dever <>
Subject Re: [httpclient]
Date Tue, 01 Oct 2002 21:43:14 GMT
> >* The only way to create a file part is from a instance. There
> >is no way to use buffered data, or a stream, other than writing it to a File
> >first.
> >
> >
> It would be nice to have these options as well. I found it easier to
> deal with building the request off of files because otherwise the memory
> requirements can get out of hand when dealing with larger files. Is it
> valid to assume that one can always create a temp file in JVM and use
> that to store the contents prior to the request? Or is it more
> benificial to allow one to instantiate off of other sources (Streams or
> buffers)? In such cases, would the content either stay in memory or get
> stored temporarily in a file somewhere behind the scenes (another
> possible option)?

The use of a stream is a common pattern in HttpClient, and also applies here.  If
they want to stream file, using a FileInputStream is pretty easy to create for
the client, and can be handled just like any other stream.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message