protected static String trimFileExtension ( String fileName ) { if ( fileName . lastIndexOf ( ' ' ) == - 1 ) { return fileName ; } return fileName . substring ( 0 , fileName . lastIndexOf ( ' ' ) ) ; }
Remove the file extension .