Package org.springframework.samples.imagedb

Examples of org.springframework.samples.imagedb.ImageDescriptor


  public void listImages(int nrOfCalls) throws IOException {
    List images = this.imageDatabase.getImages();
    StopWatch stopWatch = new StopWatch();
    for (Iterator it = images.iterator(); it.hasNext();) {
      ImageDescriptor image = (ImageDescriptor) it.next();
      stopWatch.start(image.getName());
      ByteArrayOutputStream os = null;
      for (int i = 0; i < nrOfCalls; i++) {
        os = new ByteArrayOutputStream();
        this.imageDatabase.streamImage(image.getName(), os);
      }
      stopWatch.stop();
      System.out.println("Found image '" + image.getName() + "' with content size " + os.size() +
          " and description length " + image.getDescriptionLength());
    }
    System.out.println(stopWatch.prettyPrint());
  }
View Full Code Here


  protected void executeInternal(JobExecutionContext context) {
    logger.info("Listing images in image database, scheduled by Quartz");
    List images = this.imageDatabase.getImages();
    String[] imageNames = new String[images.size()];
    for (int i = 0; i < images.size(); i++) {
      ImageDescriptor image = (ImageDescriptor) images.get(i);
      imageNames[i] = image.getName();
    }

    String text = "Images in image database: " + StringUtils.arrayToDelimitedString(imageNames, ", ");
    logger.info(text);
View Full Code Here

  public void run() {
    logger.info("Listing images in image database, scheduled by Timer");
    List images = this.imageDatabase.getImages();
    String[] imageNames = new String[images.size()];
    for (int i = 0; i < images.size(); i++) {
      ImageDescriptor image = (ImageDescriptor) images.get(i);
      imageNames[i] = image.getName();
    }

    String text = "Images in image database: " + StringUtils.arrayToDelimitedString(imageNames, ", ");
    logger.info(text);
View Full Code Here

TOP

Related Classes of org.springframework.samples.imagedb.ImageDescriptor

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.