On 6/21/05, mummertm <[EMAIL PROTECTED]> wrote:

> I have a Java-Servlet or a Java-Class, which retrieves an image (JPG)
> from a database. As customary this Blob is stored in a byte array (byte
> []). The Flex-Application connects to the Java application to request
> the image. My problem is now to find a suitable datatype, which can
> store binary data in ActionScript.

Write a servlet and access it from Flex using its URL.  In the
servlet, set the content-type of the response to "image/jpeg" and then
just write the binary data to the output stream.

See the Gif2JpegServlet class here:
http://manish.revise.org/flash/flex/gmap.zip
It read from one stream and writes to another.  Simple.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to