question: public static File toSLDFile ( final File file ) { final String path = file . getAbsolutePath ( ) ; final String base = path . substring ( 0 , path . length ( ) - 4 ) ; String newPath = base + ".sld" ; File sld = new File ( newPath ) ; if ( sld . exists ( ) ) { return sld ; } newPath = base + ".SLD" ; sld = new File ( newPath ) ; if ( sld . exists ( ) ) { return sld ; } return null ; }
target:  Figure out if a valid SLD file is available.