This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes ImageIO thread-safe? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "ImageIO thread-safe?" Watch "ImageIO thread-safe?" New topic

ImageIO thread-safe?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41089
For my JSP charting tag library (cewolf), I'm trying to figure out if the ImageIO API is thread-safe. Some suggest yes, but the ImageIO Guide specifically states that thread-safety is a non-goal. ImageIO.write in particular looks like it might cache and reuse ImageWriter objects, and thus not be thread-safe. Has anyone confirmed that one way or the other?

Even if ImageIO.write were not thread-safe, would creating ImageWriter objects some other way (allocating new ones for each request, assuming that's possible) be thread-safe?

The javadocs don't talk about thread-safety at all. Thanks in advance for any pointers.

Ping & DNS - my free Android networking tools app
jQuery in Action, 2nd edition
subject: ImageIO thread-safe?
Similar Threads
String objects
Thread Safety
Resizing a gif
HttpSession methods thread-safe?
Regarding Thread-safe in Servlets