James Wilson wrote:

> response.setContentlength(int)
> What is the best way to determine what size your
> response object is?  I'm sending a Vector object that
> contains many different types of objects.  How do I
> figure out what size the vector whould be?
>

One way would be to serialize the Vector to a ByteArrayOutputStream and then
call that stream's size() method.  After setting the content length correctly,
you can ask call toByteArray() to get a real array, and just copy the bytes to
your ServletOutputStream.

> James Wilson

Craig McClanahan

___________________________________________________________________________
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