Package org.apache.cxf.mime.types

Examples of org.apache.cxf.mime.types.XopType


    }

    public static XopType createXopObject(Class<?> clazz)
        throws IOException {
       
        XopType xopObj = new XopType();
        xopObj.setName("hello world");       
               
        URL url1 = clazz.getResource("my.wav");
        File file = new File(url1.getFile());
        FileInputStream fi = new FileInputStream(file);
        byte[] buffer = new byte[(int) file.length()];
        fi.read(buffer);
        xopObj.setAttachinfo(buffer);
       
        return xopObj;       
    }
View Full Code Here


    }

    public static XopType createXopObject(Class<?> clazz)
        throws IOException, URISyntaxException {
       
        XopType xopObj = new XopType();
        xopObj.setName("hello world");       
               
        URL url1 = clazz.getResource("my.wav");
       
        xopObj.setAttachinfo(new DataHandler(url1));
       
        return xopObj;       
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.mime.types.XopType

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.