get the extension of a file . the code is based on http://java.sun.com/docs/books/tutorial/uiswing/components/examples/utils.java concode_field_sep String OS concode_elem_sep NumberFormat LONG_DECIMAL_FORMAT concode_field_sep boolean isLinux concode_elem_sep boolean checkOverwrite concode_elem_sep T[] intersect concode_elem_sep boolean shouldOverwrite concode_elem_sep boolean isProgramInstalled concode_elem_sep void centerWindow concode_elem_sep String convertGlobToRegEx concode_elem_sep String execAndWait concode_elem_sep JTextArea makeLabelStyle concode_elem_sep String escapeSimple concode_elem_sep T cast concode_elem_sep boolean contains concode_elem_sep boolean areCollectionsEqual concode_elem_sep void printHeapUtilization concode_elem_sep boolean isWindows concode_elem_sep KeyStroke getKeyStrokeForMenu concode_elem_sep Process exec concode_elem_sep String removeQuotes concode_elem_sep boolean isMacOS
String function ( File arg0 ) { String loc0 = null ; String loc1 = arg0 . getName ( ) ; int loc2 = loc1 . lastIndexOf ( '.' ) ; if ( ( loc2 > 0 ) && ( loc2 < loc1 . length ( ) - 1 ) ) { loc0 = loc1 . substring ( loc2 + 1 ) ; } return loc0 ; }