1 55 56 package org.jboss.axis.encoding.ser; 57 58 import org.jboss.axis.attachments.ImageDataSource; 59 import org.jboss.axis.encoding.SerializationContext; 60 import org.jboss.logging.Logger; 61 import org.xml.sax.Attributes ; 62 63 import javax.activation.DataHandler ; 64 import javax.xml.namespace.QName ; 65 import java.awt.*; 66 import java.io.IOException ; 67 68 73 public class ImageDataHandlerSerializer extends JAFDataHandlerSerializer 74 { 75 76 private static Logger log = Logger.getLogger(ImageDataHandlerSerializer.class.getName()); 77 78 81 public void serialize(QName name, Attributes attributes, 82 Object value, SerializationContext context) 83 throws IOException 84 { 85 DataHandler dh = new DataHandler (new ImageDataSource("source", (Image)value)); 86 super.serialize(name, attributes, dh, context); 87 } } | Popular Tags |