public static String getSuffix ( File file ) { String filename = file . getName ( ) ; int index = filename . lastIndexOf ( "." ) ; if ( index != - 1 ) { return filename . substring ( index + 1 ) ; } return filename ; }
Returns a suffix string from a File .