asst1Services
Class SimpleImageServer

java.lang.Object
  extended by asst1Services.SimpleImageServer

public class SimpleImageServer
extends java.lang.Object

This class implements something that "serves up" images, one at a time. This implementation assumes the images are contained in a subdirectory called "img". The order in which the images are served up corresponds to the order in which the files appear in the directory.

Author:
mb

Constructor Summary
SimpleImageServer()
          Instantiates a simple image server to "serve up" the images that are contained in a sub-directory that has the name "img".
 
Method Summary
 java.awt.image.BufferedImage getNextImage()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleImageServer

public SimpleImageServer()
Instantiates a simple image server to "serve up" the images that are contained in a sub-directory that has the name "img". The image files in the sub-directory are assumed to adhere to the JPEG codec. If a file in the sub-directory does not adhere to the JPEG codec, then this causes an exception to be thrown. If the sub-directory exists but doesn't contain any files, then this image server will still be created, but won't have any images to serve up. - if sub-directory "img" is not found, then an IOException occurs - if one or more files in the sub-directory "img" do not adhere to the JPEG codec, then an ImageFormatException will occur

Method Detail

getNextImage

public java.awt.image.BufferedImage getNextImage()
                                          throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException