Examples of LargeImageResult


Examples of org.springside.examples.showcase.ws.server.result.LargeImageResult

    proxyFactory.setAddress(address);
    proxyFactory.setServiceClass(LargeImageWebService.class);
    LargeImageWebService imageService = (LargeImageWebService) proxyFactory.create();

    //调用LargeImageService
    LargeImageResult result = imageService.getImage();
    DataHandler dataHandler = result.getImageData();

    //保存图片文件并校验
    String tempFilePath = System.getProperty("java.io.tmpdir") + "largelogo.jpg";

    InputStream is = dataHandler.getInputStream();
View Full Code Here

Examples of org.springside.examples.showcase.ws.server.result.LargeImageResult

      //采用activation的DataHandler实现Streaming传输.
      DataSource dataSource = new FileDataSource(image);
      DataHandler dataHandler = new DataHandler(dataSource);

      LargeImageResult result = new LargeImageResult();
      result.setImageData(dataHandler);
      return result;
    } catch (IOException e) {
      logger.error(e.getMessage(), e);
      return WSResult.buildResult(LargeImageResult.class, WSResult.IMAGE_ERROR, "Image reading error.");
    }
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.