edu.neu.ccs.gui
Class WebImageTools

java.lang.Object
  extended byedu.neu.ccs.gui.WebImageTools

public class WebImageTools
extends Object

Class WebImageTools is a special purpose class for reading images in various formats from a web site.

Since:
2.3.3
Version:
2.3.3

Constructor Summary
private WebImageTools()
          Prevent instantiation.
 
Method Summary
static String[] readImageFileNamesFromWeb(String imagesURL, String filelistURL, String filelist)
          Returns all image file names at the given filelist url that are present in the given filelist.
static Image[] readImages(String imagesURL, String filelist)
          Reads the image files at the given url with the given filelist that contains the image file names.
static Image[] readImages(String imagesURL, String[] imageFileNames)
          Reads the image files at the given url with the given image file names.
static Image[] readImages(String imagesURL, String filelistURL, String filelist)
          Reads the image files at the given images url with the given filelist that contains the image file names; the filelist is assumed to be located at the given filelist url.
static ImagePaintable[] readImagesAsPaintable(String imagesURL, String filelist)
          Reads the image files at the given url with the given filelist that contains the image file names.
static ImagePaintable[] readImagesAsPaintable(String imagesURL, String[] imageFileNames)
          Reads the image files at the given url with the given image file names.
static ImagePaintable[] readImagesAsPaintable(String imagesURL, String filelistURL, String filelist)
          Reads the image files at the given images url with the given filelist that contains the image file names; the filelist is assumed to be located at the given filelist url.
static ImagePaintableLite[] readImagesAsPaintableLite(String imagesURL, String filelist)
          Reads the image files at the given url with the given filelist that contains the image file names.
static ImagePaintableLite[] readImagesAsPaintableLite(String imagesURL, String[] imageFileNames)
          Reads the image files at the given url with the given image file names.
static ImagePaintableLite[] readImagesAsPaintableLite(String imagesURL, String filelistURL, String filelist)
          Reads the image files at the given images url with the given filelist that contains the image file names; the filelist is assumed to be located at the given filelist url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebImageTools

private WebImageTools()
Prevent instantiation.

Method Detail

readImages

public static Image[] readImages(String imagesURL,
                                 String[] imageFileNames)

Reads the image files at the given url with the given image file names.

Returns the image list as Image[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
imageFileNames - the array of image file names
Returns:
the image list as Image[]

readImages

public static Image[] readImages(String imagesURL,
                                 String filelist)

Reads the image files at the given url with the given filelist that contains the image file names.

The filelist is assumed to be a file at the same url as the images.

Returns the image list as Image[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
filelist - the name of the text file with the image file list
Returns:
the image list as Image[]

readImages

public static Image[] readImages(String imagesURL,
                                 String filelistURL,
                                 String filelist)

Reads the image files at the given images url with the given filelist that contains the image file names; the filelist is assumed to be located at the given filelist url.

Returns the image list as Image[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
filelistURL - the web location with the file list
filelist - the name of the text file with the image file list
Returns:
the image list as Image[]

readImagesAsPaintable

public static ImagePaintable[] readImagesAsPaintable(String imagesURL,
                                                     String[] imageFileNames)

Reads the image files at the given url with the given image file names.

Returns the image list as ImagePaintable[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
imageFileNames - the array of image file names
Returns:
the image list as ImagePaintable[]

readImagesAsPaintable

public static ImagePaintable[] readImagesAsPaintable(String imagesURL,
                                                     String filelist)

Reads the image files at the given url with the given filelist that contains the image file names.

The filelist is assumed to be a file at the same url as the images.

Returns the image list as ImagePaintable[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
filelist - the name of the text file with the image file list
Returns:
the image list as ImagePaintable[]

readImagesAsPaintable

public static ImagePaintable[] readImagesAsPaintable(String imagesURL,
                                                     String filelistURL,
                                                     String filelist)

Reads the image files at the given images url with the given filelist that contains the image file names; the filelist is assumed to be located at the given filelist url.

Returns the image list as ImagePaintable[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
filelistURL - the web location with the file list
filelist - the name of the text file with the image file list
Returns:
the image list as ImagePaintable[]

readImagesAsPaintableLite

public static ImagePaintableLite[] readImagesAsPaintableLite(String imagesURL,
                                                             String[] imageFileNames)

Reads the image files at the given url with the given image file names.

Returns the image list as ImagePaintableLite[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
imageFileNames - the array of image file names
Returns:
the image list as ImagePaintableLite[]

readImagesAsPaintableLite

public static ImagePaintableLite[] readImagesAsPaintableLite(String imagesURL,
                                                             String filelist)

Reads the image files at the given url with the given filelist that contains the image file names.

The filelist is assumed to be a file at the same url as the images.

Returns the image list as ImagePaintableLite[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
filelist - the name of the text file with the image file list
Returns:
the image list as ImagePaintableLite[]

readImagesAsPaintableLite

public static ImagePaintableLite[] readImagesAsPaintableLite(String imagesURL,
                                                             String filelistURL,
                                                             String filelist)

Reads the image files at the given images url with the given filelist that contains the image file names; the filelist is assumed to be located at the given filelist url.

Returns the image list as ImagePaintableLite[].

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
filelistURL - the web location with the file list
filelist - the name of the text file with the image file list
Returns:
the image list as ImagePaintableLite[]

readImageFileNamesFromWeb

public static String[] readImageFileNamesFromWeb(String imagesURL,
                                                 String filelistURL,
                                                 String filelist)

Returns all image file names at the given filelist url that are present in the given filelist.

If the filelist url is null or blank then it is replaced by the images url. Otherwise, the images url is unused.

If the file list is null or blank, then it is replaced by the default name: imagelist.txt.

If no image files are available, returns an empty array.

Parameters:
imagesURL - the web location with the images
filelistURL - the web location with the file list
filelist - the name of the text file with the image file list
Returns:
the image file names in the list