This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler 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 Make it so: Java DB Connections & Transactions this week in the JDBC 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: 42959
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.
I agree. Here's the link:
subject: ImageIO thread-safe?
It's not a secret anymore!