File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Convert gif to byte array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert gif to byte array" Watch "Convert gif to byte array" New topic

Convert gif to byte array

Keith Harrison

Joined: Mar 04, 2006
Posts: 15

I have the following method:

At the point where I have typed >>> HERE <<< I want to read in a gif image from localhost root directory (i.e "/images/noImage.gif") and convert it to a byte array to use as return.

Seems simple enough but need guidance!

Thanks to anybody who can help

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39547
Welcome to JavaRanch.

A quick Google search found this highly relevant code example.

Ping & DNS - updated with new look and Ping home screen widget
Keith Harrison

Joined: Mar 04, 2006
Posts: 15
Thank you very much.
I agree. Here's the link:
subject: Convert gif to byte array
Similar Threads
Displaying BLOB image in a jsp page
How to display images directly from database?
downloading image
Streaming image data into JSP
wanna send image bytes to server