Use a ByteArrayInputStream [1]?

Dave

[1]
http://docs.oracle.com/javase/6/docs/api/java/io/ByteArrayInputStream.html

On Thu, Feb 23, 2012 at 4:23 PM, John W. Himpel <j...@jlhimpel.net> wrote:

> Good afternoon,
>
> I have retrieved a jpg image as a byteArray from a database but I don't
> know how to put the contents of the byteArray into a FileInputStream to
> be sent back to the browser.  I am using the Struts 2 StreamResult for
> the data transfer to the browser (Question: Am I trying to put a square
> peg into a round hole?).  I would prefer not store the byteArray into a
> temporary file and then give the StreamResult a pointer to the temporary
> file.  The desired end result is the ability for the user to extract a
> jpg file from the database and store it on their local workstation.
>
> Any suggestions or referrals would be greatly appreciated.
>
> John
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to