protected URL findResource ( Klass c , String fileName ) { boolean ends = false ; for ( String ext : allowedExtensions ) { if ( fileName . endsWith ( ext ) ) { ends = true ; break ; } } if ( ! ends ) return null ; for ( ; c != null ; c = c . getSuperClass ( ) ) { URL res = c . getResource ( fileName ) ; if ( res != null ) return res ; } return null ; }
Determines if this resource can be served