1 55 56 package org.jboss.axis.encoding.ser; 57 58 import org.jboss.axis.attachments.OctetStream; 59 import org.jboss.axis.attachments.OctetStreamDataSource; 60 import org.jboss.axis.encoding.SerializationContext; 61 import org.jboss.logging.Logger; 62 import org.xml.sax.Attributes ; 63 64 import javax.activation.DataHandler ; 65 import javax.xml.namespace.QName ; 66 import java.io.IOException ; 67 68 73 public class OctetStreamDataHandlerSerializer extends JAFDataHandlerSerializer 74 { 75 76 private static Logger log = Logger.getLogger(OctetStreamDataHandlerSerializer.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 OctetStreamDataSource("source", (OctetStream)value)); 86 super.serialize(name, attributes, dh, context); 87 } } | Popular Tags |