public static Optional < String > getFileType ( final String aUrl ) { if ( aUrl != null ) { int index = aUrl . lastIndexOf ( ' ' ) ; if ( index > 0 ) { return Optional . of ( aUrl . substring ( index + 1 ) ) ; } } return Optional . empty ( ) ; }
returns the file type of the url .