1 16 17 package org.apache.axis.components.image; 18 19 import org.apache.axis.AxisProperties; 20 import org.apache.axis.components.logger.LogFactory; 21 import org.apache.axis.utils.ClassUtils; 22 import org.apache.commons.logging.Log; 23 24 29 public class ImageIOFactory { 30 protected static Log log = 31 LogFactory.getLog(ImageIOFactory.class.getName()); 32 33 static { 34 AxisProperties.setClassOverrideProperty(ImageIO.class, "axis.ImageIO"); 35 36 AxisProperties.setClassDefaults(ImageIO.class, 41 new String [] { 42 "org.apache.axis.components.image.MerlinIO", 43 "org.apache.axis.components.image.JimiIO", 44 "org.apache.axis.components.image.JDK13IO", 45 }); 46 } 47 48 55 public static ImageIO getImageIO() { 56 ImageIO imageIO = (ImageIO)AxisProperties.newInstance(ImageIO.class); 57 58 61 if (imageIO == null) { 62 try { 63 Class cls = ClassUtils.forName("org.apache.axis.components.image.JDK13IO"); 64 imageIO = (ImageIO)cls.newInstance(); 65 } catch (Exception e) { 66 log.debug("ImageIOFactory: No matching ImageIO found",e); 67 } 68 } 69 70 log.debug("axis.ImageIO: " + imageIO.getClass().getName()); 71 return imageIO; 72 } 73 } 74 75 | Popular Tags |