private String extractExtension ( String filename ) { int startExtension = filename . indexOf ( ' ' ) ; if ( startExtension > 0 ) { return filename . substring ( startExtension + 1 ) ; } return "" ; }
A filename for example one3 - attempt - 01 . txt . gz will return txt . gz