protected void loadImage(String filePath,OMGraphicList ret){
  File file=new File(filePath);
  if (file.exists() && file.isDirectory()) {
    String[] files=file.list();
    for (int i=0; i < files.length; i++) {
      loadImage(filePath + "/" + files[i],ret);
    }
  }
 else {
    fireStatusUpdate(LayerStatusEvent.START_WORKING);
    try {
      URL fileURL=PropUtils.getResourceOrFileOrURL(filePath);
      if (fileURL != null) {
        if (imageReaderLoaders != null) {
          ImageTile imageTile=null;
          for (          ImageReaderLoader idl : imageReaderLoaders) {
            if (idl.isLoadable(filePath)) {
              ImageReader id=idl.getImageReader(fileURL);
              ImageTile tmpImageTile=id.getImageTile(imageCache);
              if (imageTile == null) {
                imageTile=tmpImageTile;
              }
 else               if (tmpImageTile != null && imageTile instanceof ErrImageTile) {
                imageTile=tmpImageTile;
              }
              if (imageTile != null && !(imageTile instanceof ErrImageTile)) {
                break;
              }
            }
          }
          if (imageTile != null) {
            addImageToLists(imageTile,ret,fileURL);
          }
        }
 else {
          logger.warning("ImageReaders not configured in " + getName() + " ImageTileLayer.");
        }
      }
 else {
        logger.warning("Can't get URL from " + filePath);
      }
    }
 catch (    MalformedURLException murle) {
    }
  }
}

protected void loadImage ( String filePath , OMGraphicList ret ) { File file = new File ( filePath ) ; if ( file . exists ( ) && file . isDirectory ( ) ) { String [ ] files = file . list ( ) ; for ( int i = 0 ; i < files . length ; i ++ ) { loadImage ( filePath + "/" + files [ i ] , ret ) ; } } else { fireStatusUpdate ( LayerStatusEvent . START_WORKING ) ; try { URL fileURL = PropUtils . getResourceOrFileOrURL ( filePath ) ; if ( fileURL != null ) { if ( imageReaderLoaders != null ) { ImageTile imageTile = null ; for ( ImageReaderLoader idl : imageReaderLoaders ) { if ( idl . isLoadable ( filePath ) ) { ImageReader id = idl . getImageReader ( fileURL ) ; ImageTile tmpImageTile = id . getImageTile ( imageCache ) ; if ( imageTile == null ) { imageTile = tmpImageTile ; } else if ( tmpImageTile != null && imageTile instanceof ErrImageTile ) { imageTile = tmpImageTile ; } if ( imageTile != null && ! ( imageTile instanceof ErrImageTile ) ) { break ; } } } if ( imageTile != null ) { addImageToLists ( imageTile , ret , fileURL ) ; } } else { logger . warning ( "ImageReaders not configured in " + getName ( ) + " ImageTileLayer." ) ; } } else { logger . warning ( "Can't get URL from " + filePath ) ; } } catch ( MalformedURLException murle ) { } } }
if filepath is a file , the imagereaderloaders are used to try to load and place the image . if filepath is a directory , this method is called for each file contained within . imagetile objects are created from the image files .
