Hello David, you should implement the interface org.apache.commons.httpclient.methods.multipart.PartSource and create a org.apache.commons.httpclient.methods.multipart.FilePart from it.
If you don't know the length of the binary data, try returning EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED (I'm not sure about this). If you can obtain the InputStream only once, throw an exception if it is requested again. cheers, Roland [EMAIL PROTECTED] 12.01.2005 22:36 Please respond to "HttpClient User Discussion" To httpclient-user@jakarta.apache.org cc Subject Advice please Hi, I need to use HTTPClient to connect to a servlet, sending either XML, or (possibly very large) binary data. I have it working nicely with the XML, but am stuck with the binary data. I receive the data as a stream, not a file, but can't see a way of sending that (probably as multipart?). Does anyone have any advice, please, on how to do this, and on the performance issues I'll face with different ways of doing it? thanks! David --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]