• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ImageIO thread-safe?

 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic