Examples of JDK13IO


Examples of org.apache.axis2.attachments.JDK13IO

        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");

        OMElement data = fac.createOMElement("mtomSample", omNs);
        OMElement image = fac.createOMElement("image", omNs);
        Image expectedImage;
        expectedImage = new JDK13IO()
                .loadImage(new FileInputStream(inputFile));

        ImageDataSource dataSource = new ImageDataSource("test.jpg",
                expectedImage);
        expectedDH = new DataHandler(dataSource);
View Full Code Here

Examples of org.apache.axis2.attachments.JDK13IO

    OMText binaryNode = (OMText) imageEle.getFirstChild();
    String nameNode = imageName.getText();
    //Extracting the data and saving
    DataHandler actualDH;
    actualDH = binaryNode.getDataHandler();
    Image actualObject = new JDK13IO().loadImage(actualDH.getDataSource()
        .getInputStream());
    FileOutputStream imageOutStream = new FileOutputStream(nameNode);
    new JDK13IO().saveImage("image/jpeg", actualObject, imageOutStream);
   
    //setting response
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace ns = fac.createOMNamespace("urn://fakenamespace", "ns");
    OMElement ele = fac.createOMElement("response", ns);
View Full Code Here

Examples of org.apache.axis2.attachments.JDK13IO

    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
    OMElement rpcWrapEle = fac.createOMElement("echoOMElement", omNs);
    OMElement data = fac.createOMElement("data", omNs);
    Image expectedImage;
    expectedImage = new JDK13IO()
        .loadImage(getResourceAsStream("org/apache/axis2/mtom/test.jpg"));

    ImageDataSource dataSource = new ImageDataSource("test.jpg",
        expectedImage);
    expectedDH = new DataHandler(dataSource);
View Full Code Here

Examples of org.apache.axis2.attachments.JDK13IO

    // OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
    OMElement ele = (OMElement) result.getFirstChild();
    OMText binaryNode = (OMText) ele.getFirstChild();
    DataHandler actualDH;
    actualDH = binaryNode.getDataHandler();
    Image actualObject = new JDK13IO().loadImage(actualDH.getDataSource()
        .getInputStream());
    FileOutputStream imageOutStream = new FileOutputStream("testout.jpg");
    new JDK13IO().saveImage("image/jpeg", actualObject, imageOutStream);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.