If it is a ByteArrayOutputStream stream you can do this:

        WOResponse response = context().response();
ByteArrayOutputStream baos = // I don't know where you get this from... response.setContentStream(new ByteArrayInputStream (baos.toByteArray()), 8192, baos.size());

        // If  this is a download...
String contentDisposition = "attachment; filename=\"" file name + "\""; response.setHeader(contentDisposition, WOApplication.ContentDispositionHeaderKey); response.setHeader("MIME TYPE GOES HEREl", WOApplication.ContentTypeHeaderKey);
        response.disableClientCaching();
        response.removeHeadersForKey("Cache-Control");
        response.removeHeadersForKey("pragma");

        return response;

If it is not a ByteArrayOutputStream, then Google "Java convert output stream input stream"

Chuck


On Apr 25, 2007, at 6:56 AM, Frederico Lellis wrote:

I'm trying to have a WOActionResult called from a directAction return an ObjectOutputSteam but i haven't had much luck , the serialization is working fine , but i cant seem to send the object . can anyone give me a hand ?
thanks in advance

--
--
******************************************************

Frederico L. Albuquerque

\o/
|    Moleque de Idéias Educação e Tecnologia Ltda
/ \

e-mail: [EMAIL PROTECTED]

[EMAIL PROTECTED]

******************************************************
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to