public static ImageIO | getImageIO()Get the ImageIO implementation. This method follows a precedence:
1. Use the class defined by the System property axis.ImageIO.
2. If that isn't set, try instantiating MerlinIO, the JDK 1.4 ImageIO implementation.
3. If that fails try JimiIO, the JIMI ImageIO implementation.
4. If that fails, instantiate the limited JDK13IO implementation.
AxisProperties.setClassOverrideProperty(ImageIO.class, "axis.ImageIO");
// If the imageIO is not configured look for the following:
// 1. Try the JDK 1.4 classes
// 2. Try the JIMI classes
// 3. If all else fails, try the JDK 1.3 classes
AxisProperties.setClassDefaults(ImageIO.class,
new String [] {
"org.apache.axis.components.image.MerlinIO",
"org.apache.axis.components.image.JimiIO",
"org.apache.axis.components.image.JDK13IO",
});
ImageIO imageIO = (ImageIO)AxisProperties.newInstance(ImageIO.class);
/**
* This shouldn't be needed, but seems to be a common feel-good:
*/
if (imageIO == null) {
try {
Class cls = ClassUtils.forName("org.apache.axis.components.image.JDK13IO");
imageIO = (ImageIO)cls.newInstance();
} catch (Exception e) {
log.debug("ImageIOFactory: No matching ImageIO found",e);
}
}
log.debug("axis.ImageIO: " + imageIO.getClass().getName());
return imageIO;
|