Hey!

I haven't used Hunter's com.oreilly.servlet.MultipartResponse.

Just a suggestion, determine the size of your file that you
are sending back.  Then send back two objects, one with
the size and then the file.

Some code crums might look like this

     ObjectOutputStream out = new ObjectOutputStream(res.getOutputStream());
    out.writeInt(filesize);
...
...
  out = new ObjectOutputStream(res.getOutputStream());
   out.writeObject(yourFile);

I haven't tested this code, though.  Good luck.

Sans adieu,
Danny Rubis


Mohammed Akacem wrote:

> Hi every body,
>
> from my applet I am sending a *.stl file to my servlet which does some
> processing
> and then should send me a file back. on the applet side I am parsing the
> inputsream.
> to read some geometry(java3D)but I need to know the file size to parse
> correctly.
>
> I want to send from the servlet first the filesize then the file itself.
>
> my questions are
>
> 1) can I use the com.oreilly.servlet.MultipartResponse
>     to send first the  file size and then the file?
> 2)is it then possible on the applet side to read from the same
>     myconnection.getInputSream() or do I have to use another
>       connection?
>
> Thanks for any help
>
> Mohammed
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to