Ronald Pieterse wrote:
and the file is uploaded. I though that if I just copy / paste and switch
server code to client code and vice versa the download part would work too.
It does indeed work until I try to do:

        bis = (ByteArrayInputStream) file.getData().getContent();

At that line a ClassCastException is thrown for the DelegatingInputStream on
which I can find nothing. How do I handle this?

The code you've included doesn't seem to do anything that requires a ByteArrayInputStream (as opposed to just any old InputStream) so you could just cast to InputStream, which should work OK. And if you get something back from getContent() that isn't an InputStream then it should be safe to call getInputStream on the DataHandler.

Ian

--
Ian Roberts               | Department of Computer Science
[EMAIL PROTECTED]  | University of Sheffield, UK

Reply via email to