Package org.codehaus.xfire.attachments

Examples of org.codehaus.xfire.attachments.ByteDataSource


        {
            atts = new JavaMailAttachments();
            context.getOutMessage().setAttachments(atts);
        }
       
        ByteDataSource source = new ByteDataSource(data, offset, length);
        source.setContentType(mimeType);
        DataHandler handler = new DataHandler(source);
       
        String id = AttachmentUtil.createContentID(elementNamespace);
        SimpleAttachment att = new SimpleAttachment(id, handler);
        att.setXOP(true);
View Full Code Here


   
    protected Attachment createAttachment(Object object, String id)
    {
        byte[] data = (byte[]) object;
       
        ByteDataSource source = new ByteDataSource(data);
        source.setContentType(getContentType(object, null));
        SimpleAttachment att = new SimpleAttachment(id, new DataHandler(source));
        att.setXOP(true);
       
        return att;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.attachments.ByteDataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.