public static String [ ] split ( String fileName ) { int dot = fileName . lastIndexOf ( ' ' ) ; if ( dot == - 1 ) return new String [ ] { fileName , null } ; else return new String [ ] { fileName . substring ( 0 , dot ) , fileName . substring ( dot + 1 ) } ; }
splits given fileName into name and extension .