public static String getFileExtension ( String fileName ) { int lastDot = fileName . lastIndexOf ( ' ' ) ; return ( lastDot >= 0 ) ? fileName . substring ( lastDot ) : null ; }
Get the file extension of given fileName .