private static String getFileExtension ( String path ) { int index = path . lastIndexOf ( ' ' ) ; if ( index == - 1 ) { return null ; } return path . substring ( index + 1 ) . toLowerCase ( Locale . ENGLISH ) ; }
returns lower cased extension