question: 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 ) { } } }
target:  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.